File size: 608 Bytes
25cd143
832754c
25cd143
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
server {
    listen 7860;

    # Serve the index.html file
    location / {
        root /app;     # Root directory where your frontend files (index.html) are located
        index index.html;
    }

    # Proxy WebSocket requests
    location /ws/ {
        proxy_pass http://localhost:6060;  # WebSocket backend
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
        proxy_set_header Host $host;
    }

    # Optional: Set cache headers for static files
    location /static/ {
        root /app;
        expires 30d;
    }
}