Skip to content

Instantly share code, notes, and snippets.

@fabiofdsantos
Last active September 23, 2021 22:35
Show Gist options
  • Save fabiofdsantos/c391b7c6630eb559d840fab5a8bf5378 to your computer and use it in GitHub Desktop.
Save fabiofdsantos/c391b7c6630eb559d840fab5a8bf5378 to your computer and use it in GitHub Desktop.
Nginx config for NuxtJS with dynamic routes
server {
listen 80;
server_name my_app.com;
index index.html index.htm;
charset utf-8;
access_log off;
error_log /dev/null;
gzip on;
gzip_types text/plain application/xml text/css application/javascript;
gzip_min_length 1000;
root /var/www/my_app/dist;
location / {
add_header Cache-Control "no-store";
try_files $uri $uri/index.html /200.html =404;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment