server { listen YOUR_IP_ADDRESS:80 default_server; root /var/www/nginx; index index.html index.htm; # This is just an invalid value which will never trigger on a real hostname. server_name _; server_name_in_redirect off; location / { # First attempt to serve request as file, then # as directory, then fall back to index.html try_files $uri $uri/ /index.html; } }