server { listen 80 default_server; root /liquidity.party/web/out; gzip on; gzip_min_length 1000; gzip_types text/plain text/xml application/javascript text/css; location / { try_files $uri $uri.html $uri/ /index.html; } # This is necessary when `trailingSlash: false`. # You can omit this when `trailingSlash: true`. location /blog/ { rewrite ^/blog/(.*)$ /blog/$1.html break; } error_page 404 /404.html; location = /404.html { internal; } }