FYI, for people like me who were looking for something completely different, the following configuration will listen and respond to all requests on port 80, asking if you are using an IP address or a URL (all AKA):
server { listen 80 default_server; server_name _; ... }
Taken from: http://nginx.org/en/docs/http/server_names.html
In the catch-all server examples, you can see the strange name "_":
server {listen to 80 default_server; server name _; return 444; } There is nothing special about this name, ...
You will get errors on sudo service nginx restart or ... start , while the symbolic link /etc/nginx/sites-enabled/default is still active since it uses the same match pattern. Just remove this link and everything should work.
source share