server { listen 80; root /usr/share/nginx/html; index index.html; location / { try_files $uri /index.html; } location /protected/ { proxy_pass http://${BACKEND_HOST}:${BACKEND_PORT}; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } }