| |
| |
| |
|
|
| worker_processes 1; |
| error_log /var/log/nginx/error.log warn; |
|
|
| events { worker_connections 1024; } |
|
|
| http { |
| include /etc/nginx/mime.types; |
| default_type application/octet-stream; |
| sendfile on; |
| keepalive_timeout 65; |
|
|
| map $http_upgrade $connection_upgrade { |
| default upgrade; |
| '' close; |
| } |
|
|
| server { |
| listen 80 default_server; |
|
|
| |
| root /var/www/lumi; |
| index index.html; |
|
|
| |
| location /gradio_api/ { |
| proxy_pass http://127.0.0.1:7860/gradio_api/; |
| proxy_http_version 1.1; |
| proxy_set_header Host $host; |
| proxy_set_header Upgrade $http_upgrade; |
| proxy_set_header Connection $connection_upgrade; |
| proxy_set_header X-Real-IP $remote_addr; |
| proxy_buffering off; |
| proxy_read_timeout 300s; |
| } |
|
|
| |
| location /queue/ { |
| proxy_pass http://127.0.0.1:7860/queue/; |
| proxy_http_version 1.1; |
| proxy_set_header Upgrade $http_upgrade; |
| proxy_set_header Connection $connection_upgrade; |
| proxy_buffering off; |
| proxy_read_timeout 300s; |
| } |
|
|
| location /api/ { |
| proxy_pass http://127.0.0.1:7860/api/; |
| proxy_http_version 1.1; |
| proxy_buffering off; |
| proxy_read_timeout 300s; |
| } |
|
|
| location /run/ { |
| proxy_pass http://127.0.0.1:7860/run/; |
| proxy_http_version 1.1; |
| proxy_buffering off; |
| proxy_read_timeout 300s; |
| } |
|
|
| location = /upload { |
| proxy_pass http://127.0.0.1:7860/upload; |
| proxy_buffering off; |
| } |
|
|
| location = /info { proxy_pass http://127.0.0.1:7860/info; } |
| location = /config { proxy_pass http://127.0.0.1:7860/config; } |
|
|
| |
| location ~* "^/file=" { |
| proxy_pass http://127.0.0.1:7860; |
| proxy_buffering off; |
| proxy_read_timeout 60s; |
| } |
|
|
| |
| location / { |
| try_files $uri $uri/ /index.html; |
| } |
| } |
| } |
|
|