Skip to content

Instantly share code, notes, and snippets.

@pcnoic
Last active June 27, 2022 18:54
Show Gist options
  • Save pcnoic/130375e9bfa7e7cd9c56362047063bc7 to your computer and use it in GitHub Desktop.
Save pcnoic/130375e9bfa7e7cd9c56362047063bc7 to your computer and use it in GitHub Desktop.
SPA NGINX config podhustlr
server {
listen 80;
server_name localhost;
port_in_redirect off;
autoindex on;
location / {
root /spa;
index index.html index.htm;
# kill cache
add_header Last-Modified $date_gmt;
add_header Cache-Control 'no-store, no-cache';
if_modified_since off;
expires off;
etag off;
}
# redirect server error pages to the static page /50x.html
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /spa;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment