server { listen 80 default_server; listen [::]:80 default_server; server_name _; root /opt/photobioreactor; index frontend/index.html; location = / { return 302 /frontend/index.html; } location /frontend/ { try_files $uri =404; } location /data/ { add_header Cache-Control "no-store"; try_files $uri =404; } location /logs/ { add_header Cache-Control "no-store"; try_files $uri =404; } location /config/ { add_header Cache-Control "no-store"; try_files $uri =404; } location = /vendor/chart.js { alias /opt/photobioreactor/node_modules/chart.js/dist/chart.umd.js; } location = /vendor/xlsx.js { alias /opt/photobioreactor/node_modules/xlsx/dist/xlsx.full.min.js; } location /api/ { proxy_pass http://127.0.0.1:3000; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } }