New Domains Redirecting
-
- Posts: 4
- Joined: Thu Jan 04, 2018 9:10 pm
- Os: CentOS 6x
- Web: nginx + php-fpm
New Domains Redirecting
Hi guys,
First off I have been using Vesta for over 18 months with no issues! However since the recent update I have been experiencing something strange on newly added domains/subdomains with no chances being made by myself.
If I add a domain/subdomain to a user with it adds without any errors but when browsing to that newly added site in any browsers and different devices it redirects to the root domain that Vesta was install on. I thought it was the user at first so created a new user added another site tested with another domain (different) it does the exact same thing.
I have tried running /usr/local/vesta/bin/v-rebuild-user [username] and /usr/local/vesta/bin/v-rebuild-web-domains [username] with no avail. There isn't anything I can see in any off the logs. One thing worth noting is the nginx.conf and snginx.conf are missing from the newly created user and the existing account in this location: /home/[username]/conf/web/.
I am running Centos 7, nginx + php-fpm with externally hosted DNS.
Any help would be greatly appreciated as it's been driving me nuts for the last few days!
Thanks in advance.
First off I have been using Vesta for over 18 months with no issues! However since the recent update I have been experiencing something strange on newly added domains/subdomains with no chances being made by myself.
If I add a domain/subdomain to a user with it adds without any errors but when browsing to that newly added site in any browsers and different devices it redirects to the root domain that Vesta was install on. I thought it was the user at first so created a new user added another site tested with another domain (different) it does the exact same thing.
I have tried running /usr/local/vesta/bin/v-rebuild-user [username] and /usr/local/vesta/bin/v-rebuild-web-domains [username] with no avail. There isn't anything I can see in any off the logs. One thing worth noting is the nginx.conf and snginx.conf are missing from the newly created user and the existing account in this location: /home/[username]/conf/web/.
I am running Centos 7, nginx + php-fpm with externally hosted DNS.
Any help would be greatly appreciated as it's been driving me nuts for the last few days!
Thanks in advance.
-
- Support team
- Posts: 1096
- Joined: Sat Sep 06, 2014 9:58 pm
- Contact:
- Os: Debian 8x
- Web: apache + nginx
Re: New Domains Redirecting
For that new user you created, can you post the nginx.conf and apache2.conf from his dir /home/user/web/
-
- Posts: 4
- Joined: Thu Jan 04, 2018 9:10 pm
- Os: CentOS 6x
- Web: nginx + php-fpm
Re: New Domains Redirecting
The thing is even for a brand new user they don't get the nginx.conf & snginx.conf apart from the one specific for that domain. Have a look at these two screenshots.mehargags wrote:For that new user you created, can you post the nginx.conf and apache2.conf from his dir /home/user/web/
https://ibb.co/dxbxjw
https://ibb.co/b05CHG
-
- Support team
- Posts: 1096
- Joined: Sat Sep 06, 2014 9:58 pm
- Contact:
- Os: Debian 8x
- Web: apache + nginx
Re: New Domains Redirecting
A fresh new user which doesn't have any domains created yet will not have any conf files in his .../conf/web directory. When you enable ssl, additional snginx/sapache2 conf files are made too.
But as in your second screenshot you do have nginx.conf file. Are you using Apache-less Nginx + PHP-FPM stack ?
But as in your second screenshot you do have nginx.conf file. Are you using Apache-less Nginx + PHP-FPM stack ?
-
- Posts: 4
- Joined: Thu Jan 04, 2018 9:10 pm
- Os: CentOS 6x
- Web: nginx + php-fpm
Re: New Domains Redirecting
Yes that is correct I am running Nginx + PHP-FPM without Apache.
-
- Posts: 4
- Joined: Thu Jan 04, 2018 9:10 pm
- Os: CentOS 6x
- Web: nginx + php-fpm
Re: New Domains Redirecting
This is a copy of the test.jakestephens.co.uk.nginx.conf which redirects to the 'admin' URL that Vesta was used at the time of installing Vesta. This is a new test user and subdomain with an unmodified conf.
I have compared this config to a known working site which has been hosted on Vesta for over 18 months and it is pretty mich identical apart from the username. Some help unpicking this would be really appreciated as currently I can't add anymore sites due to them redirecting :(
Code: Select all
server {
listen 192.168.100.252:80 spdy;
server_name test.jakestephens.co.uk ;
root /home/TestUsr/web/test.jakestephens.co.uk/public_html;
index index.php index.html index.htm;
access_log /var/log/nginx/domains/test.jakestephens.co.uk.log combined;
access_log /var/log/nginx/domains/test.jakestephens.co.uk.bytes bytes;
error_log /var/log/nginx/domains/test.jakestephens.co.uk.error.log error;
location / {
location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js)$ {
expires max;
}
location ~ [^/]\.php(/|$) {
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
if (!-f $document_root$fastcgi_script_name) {
return 404;
}
fastcgi_pass 127.0.0.1:9003;
fastcgi_index index.php;
include /etc/nginx/fastcgi_params;
}
}
error_page 403 /error/404.html;
error_page 404 /error/404.html;
error_page 500 502 503 504 /error/50x.html;
location /error/ {
alias /home/TestUsr/web/test.jakestephens.co.uk/document_errors/;
}
location ~* "/\.(htaccess|htpasswd)$" {
deny all;
return 404;
}
location /vstats/ {
alias /home/TestUsr/web/test.jakestephens.co.uk/stats/;
include /home/TestUsr/conf/web/test.jakestephens.co.uk.auth*;
}
include /etc/nginx/conf.d/phpmyadmin.inc*;
include /etc/nginx/conf.d/phppgadmin.inc*;
include /etc/nginx/conf.d/webmail.inc*;
include /home/TestUsr/conf/web/nginx.test.jakestephens.co.uk.conf*;
}
-
- Support team
- Posts: 1096
- Joined: Sat Sep 06, 2014 9:58 pm
- Contact:
- Os: Debian 8x
- Web: apache + nginx
Re: New Domains Redirecting
May be something to do with DNS ? But I checked it seems correct too... seriously no idea whats going on.. sorry for not being of much help
Re: New Domains Redirecting
I think this is the problem I have. Please have you been able to find a solution to this. Although its happening to just one of my domains at the moment. I really need help.
-
- Support team
- Posts: 1096
- Joined: Sat Sep 06, 2014 9:58 pm
- Contact:
- Os: Debian 8x
- Web: apache + nginx
Re: New Domains Redirecting
Does it happen to SSL sites only or even the Non-SSL ones too ?
Re: New Domains Redirecting
This happened to just one of my domain on the server and even setting up ssl did not change it. It still happens.