server { listen 8009; listen [::]:8009; root /var/www/bsetup/client; index index.html index.htm index.nginx-debian.html; server_name _; location / { # First attempt to serve request as file, then # as directory, then fall back to displaying a 404. root /var/www/bsetup/client; index index.html; try_files $uri $uri/ /index.html =404; } location /api { proxy_pass http://127.0.0.1:9009; } location /ws { proxy_pass http://127.0.0.1:9009; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_set_header Host $host; proxy_read_timeout 86400; proxy_send_timeout 86400; keepalive_timeout 86400; } }