mirror of
https://github.com/thilo-behnke/wasm-pong.git
synced 2026-05-14 07:56:34 +00:00
38 lines
892 B
Plaintext
38 lines
892 B
Plaintext
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
|
|
root /usr/share/nginx;
|
|
|
|
location = / {
|
|
return 301 /pong/web;
|
|
}
|
|
|
|
location /pong/web/ {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
location /pong/api/ {
|
|
proxy_pass http://api_server/;
|
|
|
|
proxy_redirect off;
|
|
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-Host $server_name;
|
|
}
|
|
|
|
location /pong/ws {
|
|
proxy_pass http://api_server/ws;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection $connection_upgrade;
|
|
proxy_set_header Host $host;
|
|
}
|
|
|
|
error_page 500 502 503 504 /50x.html;
|
|
location = /50x.html {
|
|
root /usr/share/nginx/html;
|
|
}
|
|
}
|