upstream upstream-sl-gateway-support { server test_sl-gateway-support:22222 weight=1; } server { listen 80; server_name _; root /usr/share/nginx/html/; index index.html; location / { try_files $uri $uri/ @router; index index.html; } location @router { rewrite ^.*$ /index.html last; } location /gateway { proxy_pass http://upstream-sl-gateway-support/gateway; proxy_redirect off; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $http_host; proxy_connect_timeout 30; proxy_send_timeout 180; proxy_read_timeout 180; proxy_buffering off; client_max_body_size 100m; } error_page 404 /404.html; location = /40x.html { } error_page 500 502 503 504 /50x.html; location = /50x.html { } }