server { listen 80; listen [::]:80; server_name localhost; access_log off; gzip on; gzip_comp_level 6; gzip_min_length 1000; gzip_proxied any; gzip_disable "msie6"; gzip_types application/atom+xml application/geo+json application/javascript application/x-javascript application/json application/ld+json application/manifest+json application/rdf+xml application/rss+xml application/xhtml+xml application/xml font/eot font/otf font/ttf image/svg+xml text/css text/javascript text/plain text/xml; # serve static assets (that have a cache busting hash) with an efficient cache policy location /assets { root /usr/share/nginx/html; expires 1y; add_header Cache-Control "public"; } location / { root /usr/share/nginx/html; index index.html; rewrite ^/register/ /index.html break; rewrite ^/login /index.html break; rewrite ^/jwt /index.html break; } location ~ ^/[@_*]/ { try_files $uri $uri/ /index.html; } }