How to configure nginx not to show if IP is used in the brow
my linode runs few websites using nqinx. If I use ip address in a browser nginx displays one of the sites. I think it's the last one I set up.
How can I make it so nothing is displayed?
Thank you
R.
Conf file for the site that is displayed if ip is used.
server {
listen 80;
server_name yota.rsness.com;
access_log /srv/www/wordpress/zxc.zxcv.com/logs/access.log;
error_log /srv/www/wordpress/zxc.zxcv.com/logs/error.log;
location / {
root /srv/www/wordpress/zxc.zxcv.com/public_html;
try_files $uri $uri/ /index.php?q=$uri&$args;
index index.html index.htm index.php;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /srv/www/wordpress/zxc.zxcv.com/public_html$fastcgi_script_name;
}
}
2 Replies
@hoopycat:
Set one of the server{} blocks – perhaps one that's just a "Move along, nothing to see here" page -- as the default.
I had the default option in the server{} block of the web that was displayed when using ip. So I removed it hopping it would fix it.
Your suggestion works. Thank you.
R.