# nginx config file for a SPA (single page app) server { listen 80 default_server; gzip on; gzip_min_length 1000; gzip_types text/plain text/xml application/javascript text/css; root /usr/share/nginx/html; location / { try_files $uri $uri/index.html /index.html; } location ~ \.(?!html) { try_files $uri =404; } }