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

Default website for IP

General questions about VestaCP
Post Reply
  • Print view
Advanced search
7 posts • Page 1 of 1
rickyseptiawan
Posts: 3
Joined: Fri Apr 29, 2016 6:01 am

Default website for IP
  • Quote

Post by rickyseptiawan » Fri Mar 10, 2017 5:30 am

Hi There,

If I access my vesta external IP , it redirects me to the first created website ?
is there any way to set a default site / just 404 page / handle the redirection ?

I have been searching all the forum and couldnt get anything

Kind Regards,
Top

Syeef
Posts: 52
Joined: Tue May 03, 2016 11:35 pm

Re: Default website for IP
  • Quote

Post by Syeef » Fri Mar 10, 2017 2:37 pm

The default site has to be the first VirtualHost.

So I do the following:

I add in file: /etc/httpd/conf.d/xxx.xxx.xxx.xxx.conf (your ip address)

Code: Select all

<VirtualHost xxx.xxx.xxx.xxx:8080>
  ServerName localhost
  DocumentRoot /home/admin/web/default.domain.com/public_html
</VirtualHost>
Then I add in file: /etc/nginx/conf.d/xxx.xxx.xxx.xxx.conf

Code: Select all

server {
    listen       xxx.xxx.xxx.xxx:80 default;
    server_name  _;
    #access_log  /var/log/nginx/xxx.xxx.xxx.xxx.log main;
    location / {
        proxy_pass  http://xxx.xxx.xxx.xxx:8080;
   }
}
Then i do server restart:

Code: Select all

service httpd restart
service nginx restart
Top

ScIT
Support team
Posts: 617
Joined: Mon Feb 23, 2015 4:13 pm

Os: Ubuntu 17x
Web: apache + nginx
Re: Default website for IP
  • Quote

Post by ScIT » Fri Mar 10, 2017 5:10 pm

syeef is right, this will work.

Another solution is to change the order in /etc/apache2/conf.d/vesta.conf, the first one in top will be displayed as default. So you can there just move your default-site from admin to top.
Top

vazellin
Posts: 1
Joined: Tue Aug 14, 2018 9:41 am

Os: Debian 8x
Web: nginx + php-fpm
Re: Default website for IP
  • Quote

Post by vazellin » Tue Aug 14, 2018 9:53 am

I think this issue is big trouble and security issue. After several mounth of using VestaCP I found that all my new registered domains is not linked to default site. But the domains linked for firs site from VestaCP. As a result all this domains indexed by google and many people viewed pages with absurd content.
VestaCP needs to make right order by default in files /etc/apache2/conf.d/vesta.conf and /etc/nginx/conf.d/vesta.conf
I think many users don't know about this bug and still use VestaCP as if all is well.
Top

ScIT
Support team
Posts: 617
Joined: Mon Feb 23, 2015 4:13 pm

Os: Ubuntu 17x
Web: apache + nginx
Re: Default website for IP
  • Quote

Post by ScIT » Tue Aug 14, 2018 10:40 am

vazellin wrote: ↑
Tue Aug 14, 2018 9:53 am
I think this issue is big trouble and security issue. After several mounth of using VestaCP I found that all my new registered domains is not linked to default site. But the domains linked for firs site from VestaCP. As a result all this domains indexed by google and many people viewed pages with absurd content.
VestaCP needs to make right order by default in files /etc/apache2/conf.d/vesta.conf and /etc/nginx/conf.d/vesta.conf
I think many users don't know about this bug and still use VestaCP as if all is well.
think this issue has nothing to do with security. Just had this once on one of my servers, then I changed the order in the config file and the issue was resolved.
Top

Galaxian
Posts: 24
Joined: Tue Feb 10, 2015 1:43 am

Re: Default website for IP
  • Quote

Post by Galaxian » Sun Aug 19, 2018 4:08 pm

I agree with vazellin that this is a problem that should be addressed by VestaCP. The other panels I have used haven't done this by default. I have pages indexed by Google that shouldn't be indexed which are duplication because subdomains like ftp., etc, are appearing as the default account. This is an SEO no-no.

Can anyone explain what the code from the poster above does?
Top

j.salanhac
Posts: 1
Joined: Thu Jun 04, 2020 7:19 pm

Os: Debian 8x
Web: apache
Re: Default website for IP
  • Quote

Post by j.salanhac » Thu Jun 04, 2020 7:23 pm

old subject, but maybe my answer will help somebody.

soluce found : make a symbolic link in /etc/apache2/conf.d# named to be load before XXX.XXX.XXX.XXX.conf (server ip)

Code: Select all

root@dev:/etc/apache2/conf.d# ln -s /home/admin/conf/web/MY_DEFAUT_DOMAIN.apache2.conf 000-default.conf
Top


Post Reply
  • Print view

7 posts • Page 1 of 1

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
 

 

cron

Login  •  Register

I forgot my password