ubuntu - remove default nginx welcome page when access directly from ip address -


at ubuntu server, install nginx , setup virtual host using article. https://www.digitalocean.com/community/articles/how-to-set-up-nginx-virtual-hosts-server-blocks-on-ubuntu-12-04-lts--3

the virtual host's domain name www.example.com. when go www.example.com, can see application's index page. however, when go real ip address, still see nginx welcome page. can remove welcome page or point www.example.com if uses ip address access site?

i setup a record point ip xxx.xxx.xxx.xxx www.example.com.

i think when first set nginx comes "default" virtual host. did tried removing that? did tried deleting symlink? third option add "deny all;" on location / of default virtual host.

i not sure if work , cannot test right now. if above not work, try out: http://nginx.org/en/docs/http/request_processing.html#how_to_prevent_undefined_server_names

http://your-server-ip/ request undefined server name. should able block with:

server {     listen      80;     server_name "";     return      444; } 

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -

php - Accessing static methods using newly created $obj or using class Name -