server { listen 80; server_name localhost; server_tokens off; location / { root /usr/share/nginx/html; # index index.html; try_files $uri $uri/ @index; } location @index { # add_header Cache-Control no-cache; server_tokens off; expires -1; root /usr/share/nginx/html; try_files /index.html =404; } # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } }