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 General Discussion
  • Search

New Domains Redirecting

General questions about VestaCP
Post Reply
  • Print view
Advanced search
11 posts
  • 1
  • 2
  • Next
jakestephens
Posts: 4
Joined: Thu Jan 04, 2018 9:10 pm

Os: CentOS 6x
Web: nginx + php-fpm
New Domains Redirecting
  • Quote

Post by jakestephens » Thu Jan 04, 2018 9:27 pm

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.
Top

mehargags
Support team
Posts: 1096
Joined: Sat Sep 06, 2014 9:58 pm
Contact:
Contact mehargags
Website Skype

Os: Debian 8x
Web: apache + nginx
Re: New Domains Redirecting
  • Quote

Post by mehargags » Fri Jan 05, 2018 1:54 am

For that new user you created, can you post the nginx.conf and apache2.conf from his dir /home/user/web/
Top

jakestephens
Posts: 4
Joined: Thu Jan 04, 2018 9:10 pm

Os: CentOS 6x
Web: nginx + php-fpm
Re: New Domains Redirecting
  • Quote

Post by jakestephens » Fri Jan 05, 2018 7:06 am

mehargags wrote:For that new user you created, can you post the nginx.conf and apache2.conf from his dir /home/user/web/
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.

https://ibb.co/dxbxjw
https://ibb.co/b05CHG
Top

mehargags
Support team
Posts: 1096
Joined: Sat Sep 06, 2014 9:58 pm
Contact:
Contact mehargags
Website Skype

Os: Debian 8x
Web: apache + nginx
Re: New Domains Redirecting
  • Quote

Post by mehargags » Fri Jan 05, 2018 10:13 am

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 ?
Top

jakestephens
Posts: 4
Joined: Thu Jan 04, 2018 9:10 pm

Os: CentOS 6x
Web: nginx + php-fpm
Re: New Domains Redirecting
  • Quote

Post by jakestephens » Fri Jan 05, 2018 10:35 am

Yes that is correct I am running Nginx + PHP-FPM without Apache.
Top

jakestephens
Posts: 4
Joined: Thu Jan 04, 2018 9:10 pm

Os: CentOS 6x
Web: nginx + php-fpm
Re: New Domains Redirecting
  • Quote

Post by jakestephens » Fri Jan 05, 2018 2:47 pm

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.

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*;
}
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 :(
Top

mehargags
Support team
Posts: 1096
Joined: Sat Sep 06, 2014 9:58 pm
Contact:
Contact mehargags
Website Skype

Os: Debian 8x
Web: apache + nginx
Re: New Domains Redirecting
  • Quote

Post by mehargags » Fri Jan 05, 2018 3:28 pm

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
Top

sirpros
Posts: 13
Joined: Mon Oct 21, 2013 8:29 am

Re: New Domains Redirecting
  • Quote

Post by sirpros » Mon Apr 23, 2018 6:32 pm

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.
Top

mehargags
Support team
Posts: 1096
Joined: Sat Sep 06, 2014 9:58 pm
Contact:
Contact mehargags
Website Skype

Os: Debian 8x
Web: apache + nginx
Re: New Domains Redirecting
  • Quote

Post by mehargags » Mon Apr 23, 2018 7:13 pm

Does it happen to SSL sites only or even the Non-SSL ones too ?
Top

sirpros
Posts: 13
Joined: Mon Oct 21, 2013 8:29 am

Re: New Domains Redirecting
  • Quote

Post by sirpros » Mon Apr 23, 2018 7:25 pm

This happened to just one of my domain on the server and even setting up ssl did not change it. It still happens.
Top


Post Reply
  • Print view

11 posts
  • 1
  • 2
  • Next

Return to “General Discussion”



  • 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