server { listen 80; server_name opendc.org; location / { root /usr/share/nginx/html; index index.html index.htm; try_files $uri $uri/ /index.html; } location /socket.io { proxy_http_version 1.1; proxy_buffering off; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_pass http://api:8081/socket.io; } location /tokensignin { proxy_pass http://api:8081/tokensignin; } location /api { proxy_pass http://api:8081/api; } error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } }