server { listen 80; listen [::]:80; server_name _; root /usr/share/nginx/html; index index.html; gzip on; gzip_vary on; gzip_types text/plain text/css application/json application/javascript text/xml application/xml; location = /oauth-client-metadata.json { default_type application/json; sub_filter_once off; sub_filter_types application/json; sub_filter '__FRONTEND_HOSTNAME__' $host; try_files /oauth-client-metadata.json =404; } location /assets/ { expires 1y; add_header Cache-Control "public, immutable"; try_files $uri =404; } location = / { try_files /homepage.html /index.html; } location /app/ { try_files $uri $uri/ /index.html; } location / { try_files $uri $uri/ /index.html; } }