28 lines
671 B
Nginx Configuration File
28 lines
671 B
Nginx Configuration File
server {
|
|
listen 80;
|
|
server_name localhost;
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
location /api/ {
|
|
resolver 127.0.0.11 valid=30s;
|
|
set $api_upstream http://api:4000;
|
|
proxy_pass $api_upstream;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
}
|
|
|
|
location /ws/ {
|
|
resolver 127.0.0.11 valid=30s;
|
|
set $ws_upstream http://api:4000;
|
|
proxy_pass $ws_upstream;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
}
|
|
}
|