Spaces:
Paused
Paused
| worker_processes 1; | |
| pid /run/nginx.pid; | |
| error_log /var/log/nginx/error.log warn; | |
| events { | |
| worker_connections 64; | |
| } | |
| http { | |
| access_log off; | |
| client_body_temp_path /var/lib/nginx/body; | |
| proxy_temp_path /var/lib/nginx/proxy; | |
| fastcgi_temp_path /var/lib/nginx/fastcgi; | |
| uwsgi_temp_path /var/lib/nginx/uwsgi; | |
| scgi_temp_path /var/lib/nginx/scgi; | |
| map $http_upgrade $connection_upgrade { | |
| default upgrade; | |
| '' close; | |
| } | |
| server { | |
| listen 7860; | |
| # Health + Telegram bot (Flask) | |
| location /health { | |
| proxy_pass http://127.0.0.1:7861; | |
| } | |
| location / { | |
| proxy_pass http://127.0.0.1:7861; | |
| } | |
| # Web terminal (ttyd) — websocket required | |
| location /terminal/ { | |
| proxy_pass http://127.0.0.1:7862/; | |
| proxy_http_version 1.1; | |
| proxy_set_header Upgrade $http_upgrade; | |
| proxy_set_header Connection $connection_upgrade; | |
| proxy_set_header Host $host; | |
| proxy_read_timeout 3600s; | |
| proxy_send_timeout 3600s; | |
| } | |
| } | |
| } | |