server { listen 80 default_server; listen [::]:80 default_server; # Everything is a 404 location / { root /usr/share/nginx/html; } # You may need this to prevent return 404 recursion. location = /404.html { internal; } }