| worker_processes auto; |
| pid /tmp/nginx.pid; |
|
|
| events { |
| worker_connections 1024; |
| } |
|
|
| http { |
| include /etc/nginx/mime.types; |
| default_type application/octet-stream; |
|
|
| |
| access_log /tmp/nginx_access.log; |
| error_log /tmp/nginx_error.log; |
|
|
| |
| client_body_temp_path /tmp/nginx_client_body; |
| proxy_temp_path /tmp/nginx_proxy; |
| fastcgi_temp_path /tmp/nginx_fastcgi; |
| uwsgi_temp_path /tmp/nginx_uwsgi; |
| scgi_temp_path /tmp/nginx_scgi; |
|
|
| server { |
| listen 7860; |
| server_name localhost; |
|
|
| |
| location / { |
| proxy_pass http://127.0.0.1:8501; |
| proxy_http_version 1.1; |
| proxy_set_header Upgrade $http_upgrade; |
| proxy_set_header Connection "upgrade"; |
| proxy_set_header Host $host; |
| proxy_set_header X-Real-IP $remote_addr; |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
| proxy_set_header X-Forwarded-Proto $scheme; |
| proxy_read_timeout 86400; |
| } |
|
|
| |
| location /chat { |
| proxy_pass http://127.0.0.1:8000/chat; |
| proxy_set_header Host $host; |
| proxy_set_header X-Real-IP $remote_addr; |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
| proxy_set_header X-Forwarded-Proto $scheme; |
| |
| |
| proxy_buffering off; |
| proxy_cache off; |
| proxy_read_timeout 600s; |
| } |
|
|
| location /session { |
| proxy_pass http://127.0.0.1:8000/session; |
| proxy_set_header Host $host; |
| proxy_set_header X-Real-IP $remote_addr; |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
| proxy_set_header X-Forwarded-Proto $scheme; |
| } |
|
|
| location /dev-console { |
| proxy_pass http://127.0.0.1:8000/dev-console; |
| proxy_set_header Host $host; |
| proxy_set_header X-Real-IP $remote_addr; |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
| proxy_set_header X-Forwarded-Proto $scheme; |
| } |
|
|
| location /health { |
| proxy_pass http://127.0.0.1:8000/health; |
| proxy_set_header Host $host; |
| proxy_set_header X-Real-IP $remote_addr; |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
| proxy_set_header X-Forwarded-Proto $scheme; |
| } |
| } |
| } |
|
|