D
D
Dmitry Skogorev2014-07-12 13:29:18
Nginx
Dmitry Skogorev, 2014-07-12 13:29:18

nginx. How to ban other domains?

I bought vps, raised nginx and the aaa.ru site,
apparently, this ip already belonged to someone and the bbb.com and ccc.net domains refer to it
how to make my site open when aaa.ru is opened, and the rest is a blank page or 403/404?
Thank you

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Petrikov, 2014-07-12
@EnterSandman

More or less like this

server {
root /var/www/путь к заглушке/; 
}

server {
     server_name  aaa.ru www.aaa.ru;
#    Настройки вашего домена
}

V
Vlad Zhivotnev, 2014-07-12
@inkvizitor68sl

server { 
listen 80 default; 
return 403;
}

And better so.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question