Page 1 of 1
How to close open first site by ip server?
Posted: Tue Aug 08, 2017 1:50 pm
by James026
I have many sites on one server with vestaCP, but if open browser with ip - I see first site) But I down need, how to close this? And if I have domains, parking to my server, but didn't create nginx rule for this domain -> first site open)
Re: How to close open first site by ip server?
Posted: Thu Aug 10, 2017 4:36 pm
by gecube_ru
Yes, there is such thing. What to do?
You need to place the correct nginx configuration file to /etc/nginx directory.
I have the file
(it's my ip address + conf extension)
with contents:
Code: Select all
server {
listen 185.59.101.193:80 default;
server_name _;
#access_log /var/log/nginx/185.59.101.193.log main;
location / {
proxy_pass http://185.59.101.193:8080;
}
}
you can change the proxy_pass directive to point something more meaningful, or completely rewrite
directive to give the client correct static contents.
Re: How to close open first site by ip server?
Posted: Thu Aug 10, 2017 5:50 pm
by James026
Thanks)
ps я думал что это основная точка входа, которая проксирует на порт 8080, а там же уже работают конфиги сайтов)
Re: How to close open first site by ip server?
Posted: Tue Apr 17, 2018 7:05 am
by Orkhan
А я не понял как. Я создал новый сайт - но домена нет. И не могу просматрировать его через IP. Сам IP открывает основной сайт на root.