cpan / nginx.conf
hern0425's picture
Deploy from App
c824918 verified
raw
history blame contribute delete
739 Bytes
events { worker_connections 1024; }
http {
include mime.types;
default_type application/octet-stream;
server {
listen 7860; # Nginx 监听 Hugging Face 的端口
location / {
proxy_pass http://127.0.0.1:8317; # 转发到程序的真实端口
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;
# 支持 WebSocket (如果程序有需要)
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
}