Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

Problem: Multiple Domains forward to the same domain

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
8 posts • Page 1 of 1
bgbs
Posts: 13
Joined: Fri Jun 21, 2019 10:13 pm

Os: Ubuntu 17x
Web: apache + nginx
Problem: Multiple Domains forward to the same domain
  • Quote

Post by bgbs » Wed Jul 03, 2019 8:57 pm

When I setup domains in Vesta, the domains always go to the first website I setup by default. This only happens on HTTP. When I switch to HTTPS, the example.com does go to the correct website. Why is this, and how do I prevent this from happening?

Perhaps there is a conf file somewhere that needs editing?
Top

albert
Posts: 2
Joined: Sun Jun 30, 2019 11:49 am

Os: CentOS 6x
Web: apache + nginx
Re: Problem: Multiple Domains forward to the same domain
  • Quote

Post by albert » Mon Jul 08, 2019 6:37 pm

There could be several causes. However, it is very likely that you have some SSL cert issues that might be causing these redirects. Have you got more information... are you using Vesta for DNS, htaccess for redirects or other services?
Top

bgbs
Posts: 13
Joined: Fri Jun 21, 2019 10:13 pm

Os: Ubuntu 17x
Web: apache + nginx
Re: Problem: Multiple Domains forward to the same domain
  • Quote

Post by bgbs » Fri Sep 13, 2019 5:12 pm

I'm using nginx only, no dns in vesta. I manage dns through cloudflare, which supplies my ssl certificate as well
Top

xstocler
Posts: 12
Joined: Thu May 09, 2019 2:28 am

Os: CentOS 6x
Web: nginx + php-fpm
Re: Problem: Multiple Domains forward to the same domain
  • Quote

Post by xstocler » Fri Sep 20, 2019 5:14 pm

I have the same problem.
DNS use by cloudflare and when accessing the domain redirects to the other.
When I enable https in cloudflare to force the use of SSL it accesses the correct address.
Top

SanTi
Posts: 39
Joined: Tue Jan 08, 2019 1:23 am

Os: CentOS 6x
Web: nginx + php-fpm
Re: Problem: Multiple Domains forward to the same domain
  • Quote

Post by SanTi » Fri Sep 27, 2019 7:19 pm

Have you solved the problem? I have 5 domains on one ip. I have VPS Centos. Nginx and VestaCp installed. I was using domains without any error. I changed NS of one domain with cloudflare's an I have controlled it on cloudflare. I removed website on cloudflare and now I cant enter domains via http:// .
Top

xstocler
Posts: 12
Joined: Thu May 09, 2019 2:28 am

Os: CentOS 6x
Web: nginx + php-fpm
Re: Problem: Multiple Domains forward to the same domain
  • Quote

Post by xstocler » Tue Oct 01, 2019 11:58 am

SanTi wrote: ↑
Fri Sep 27, 2019 7:19 pm
Have you solved the problem? I have 5 domains on one ip. I have VPS Centos. Nginx and VestaCp installed. I was using domains without any error. I changed NS of one domain with cloudflare's an I have controlled it on cloudflare. I removed website on cloudflare and now I cant enter domains via http:// .

In cloudflare on SSL / TLS tab> Edge-certificates
You have the options to force the use of https to do so.


- Always Use HTTPS - ON/OFF
- Automatic HTTPS Rewrites - ON/OFF
Top

hsvesta
Posts: 8
Joined: Thu Nov 01, 2018 8:54 am

Os: Ubuntu 17x
Web: nginx + php-fpm
Re: Problem: Multiple Domains forward to the same domain
  • Quote

Post by hsvesta » Tue Oct 08, 2019 5:06 am

This might be due to incorrect HSTS configuration for Apache or Nginx

E.g. on Nginx this
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
will redirect all the HTTP example.com or sub.example.com to HTTPS example.com

Better change this to
add_header Strict-Transport-Security "max-age=31536000; preload" always;

Make sure that the Apache or Nginx configuration for HTTP are not redirecting to HTTPS, if not needed.
Top

kitty
Posts: 1
Joined: Sun Sep 06, 2020 4:42 pm

Os: Ubuntu 17x
Web: nginx + php-fpm
Re: Problem: Multiple Domains forward to the same domain
  • Quote

Post by kitty » Sun Sep 06, 2020 4:45 pm

bgbs wrote: ↑
Wed Jul 03, 2019 8:57 pm
When I setup domains in Vesta, the domains always go to the first website I setup by default. This only happens on HTTP. When I switch to HTTPS, the example.com does go to the correct website. Why is this, and how do I prevent this from happening?

Perhaps there is a conf file somewhere that needs editing?
i was able to solve this same issue by changing the cloudflare SSL settings to flexible.

"Your SSL/TLS encryption mode is Flexible"
Top


Post Reply
  • Print view

8 posts • Page 1 of 1

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password