Skip to content

Instantly share code, notes, and snippets.

@pcnoic
Last active June 17, 2022 22:11
Show Gist options
  • Save pcnoic/648584a7273dd906f058d4eed34dc915 to your computer and use it in GitHub Desktop.
Save pcnoic/648584a7273dd906f058d4eed34dc915 to your computer and use it in GitHub Desktop.
simple nginx conf
server {
listen 80;
server_name localhost;
port_in_redirect off;
autoindex on;
add_header Access-Control-Allow-Origin *;
location / {
root /spa;
try_files $uri $uri/ /index.html;
}
# redirect server error pages to the static page /50x.html
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /pwa;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment