32 lines
882 B
Plaintext
32 lines
882 B
Plaintext
|
|
# soul-api Runner - Nginx 反向代理
|
|||
|
|
# 监听 9001,代理到当前活跃实例(blue=18081, green=18082)
|
|||
|
|
# 宝塔固定 proxy_pass 到 127.0.0.1:9001,无需改配置
|
|||
|
|
|
|||
|
|
worker_processes 1;
|
|||
|
|
error_log /dev/stderr warn;
|
|||
|
|
pid /tmp/nginx.pid;
|
|||
|
|
|
|||
|
|
events { worker_connections 64; }
|
|||
|
|
|
|||
|
|
http {
|
|||
|
|
access_log /dev/stdout;
|
|||
|
|
include /etc/nginx/mime.types;
|
|||
|
|
default_type application/octet-stream;
|
|||
|
|
|
|||
|
|
server {
|
|||
|
|
listen 9001;
|
|||
|
|
server_name _;
|
|||
|
|
|
|||
|
|
location / {
|
|||
|
|
proxy_pass http://127.0.0.1:__BACKEND_PORT__;
|
|||
|
|
proxy_http_version 1.1;
|
|||
|
|
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_connect_timeout 5s;
|
|||
|
|
proxy_read_timeout 60s;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|