chat1 / nginx.conf
onlyrickroll's picture
Create nginx.conf
330a9be verified
Raw History Blame
812 Bytes
worker_processes auto;
pid /tmp/nginx.pid; # 非特权用户可写
events {
worker_connections 1024;
}
http {
# 设置非特权用户可写的临时路径
client_body_temp_path /tmp/client_body;
proxy_temp_path /tmp/proxy_temp;
fastcgi_temp_path /tmp/fastcgi_temp;
server {
listen 7860;
server_name localhost;
# 根目录反代 8080 (C/C++ 服务)
location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
# /bot 路径反代 8888 (Python 服务)
location /bot {
proxy_pass http://127.0.0.1:8888;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
}