30 lines
700 B
Plaintext
30 lines
700 B
Plaintext
|
|
server {
|
||
|
|
listen 80;
|
||
|
|
server_name _;
|
||
|
|
|
||
|
|
root /opt/archipelago/web-ui;
|
||
|
|
index index.html;
|
||
|
|
|
||
|
|
# Serve static files (Vue.js SPA)
|
||
|
|
location / {
|
||
|
|
try_files $uri $uri/ /index.html;
|
||
|
|
}
|
||
|
|
|
||
|
|
# Proxy API requests to backend
|
||
|
|
location /rpc/ {
|
||
|
|
proxy_pass http://127.0.0.1:5678;
|
||
|
|
proxy_http_version 1.1;
|
||
|
|
proxy_set_header Host $host;
|
||
|
|
proxy_set_header X-Real-IP $remote_addr;
|
||
|
|
}
|
||
|
|
|
||
|
|
# Proxy WebSocket
|
||
|
|
location /ws {
|
||
|
|
proxy_pass http://127.0.0.1:5678;
|
||
|
|
proxy_http_version 1.1;
|
||
|
|
proxy_set_header Upgrade $http_upgrade;
|
||
|
|
proxy_set_header Connection "upgrade";
|
||
|
|
proxy_set_header Host $host;
|
||
|
|
}
|
||
|
|
}
|