Skip to content

Instantly share code, notes, and snippets.

@brantje
Last active January 29, 2023 13:52
Show Gist options
  • Save brantje/ef5b28f871b67aec6178bc8f62061558 to your computer and use it in GitHub Desktop.
Save brantje/ef5b28f871b67aec6178bc8f62061558 to your computer and use it in GitHub Desktop.
Nuxt SPA config
events {
worker_connections 4096; ## Default: 1024
}
http {
server {
listen 80;
server_name localhost;
gzip on;
gzip_types text/plain application/xml text/css application/javascript;
gzip_min_length 1000;
location ~* \.(webp|jpg|jpeg|png|gif|ico|css|js)$ {
expires 365d;
}
location / {
root /usr/share/nginx/html;
index index.html index.htm;
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 /usr/share/nginx/html;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment