Run the dedicated calendar worker, bind the web service to loopback port 21005, and match the host nginx upstream. Trust forwarded headers only from the Docker subnet and replace untrusted forwarded client chains at the public proxy. Validate Compose without resolving production environment files; do not restart services.
32 lines
917 B
Plaintext
32 lines
917 B
Plaintext
# alpha.134333.xyz -> AlphaPulse web 容器(127.0.0.1:21005)
|
||
|
||
server {
|
||
listen 80;
|
||
server_name alpha.134333.xyz;
|
||
return 308 https://alpha.134333.xyz$request_uri;
|
||
}
|
||
server {
|
||
listen 443 ssl;
|
||
http2 on;
|
||
server_name alpha.134333.xyz;
|
||
|
||
include /etc/nginx/snippets/ssl-134333.xyz.conf;
|
||
include /etc/nginx/snippets/no-spider.conf;
|
||
access_log /var/log/nginx/alpha.134333.xyz.log;
|
||
error_log /var/log/nginx/alpha.134333.xyz.error.log warn;
|
||
|
||
location / {
|
||
proxy_pass http://127.0.0.1:21005;
|
||
proxy_http_version 1.1;
|
||
# SSE 不缓冲;WebSocket 需要升级头
|
||
proxy_buffering off;
|
||
proxy_set_header Upgrade $http_upgrade;
|
||
proxy_set_header Connection $http_connection;
|
||
proxy_set_header Host $http_host;
|
||
proxy_set_header X-Forwarded-Proto $scheme;
|
||
proxy_set_header X-Real-IP $remote_addr;
|
||
proxy_set_header X-Forwarded-For $remote_addr;
|
||
proxy_read_timeout 1h;
|
||
}
|
||
}
|