server { listen 80; server_name _; # Static files location / { root /opt/web-configurator/static; try_files $uri $uri/ /index.html; expires 1h; add_header Cache-Control "public, must-revalidate"; } location /configuration/ { proxy_pass http://127.0.0.1:8080/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_read_timeout 30s; } location = /configuration { return 301 /configuration/; } }