chore(docker): docker 及环境变量更新
This commit is contained in:
14
docker/nginx/conf.c/enable-websocket.conf
Normal file
14
docker/nginx/conf.c/enable-websocket.conf
Normal file
@@ -0,0 +1,14 @@
|
||||
location /ws {
|
||||
proxy_pass http://php-fpm:8080; # 注意:这里用的是 Docker 服务名或容器名
|
||||
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;
|
||||
|
||||
# 可选:设置超时(WebSocket 是长连接)
|
||||
proxy_read_timeout 86400s;
|
||||
proxy_send_timeout 86400s;
|
||||
}
|
||||
@@ -20,6 +20,9 @@
|
||||
# add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
|
||||
# --- SSL configuration end ---
|
||||
|
||||
# 启用 WebSocket 支持
|
||||
include conf.c/enable-websocket.conf;
|
||||
|
||||
#PHP-INFO-START PHP引用配置,可以注释或修改
|
||||
include conf.c/enable-php-74.conf;
|
||||
#PHP-INFO-END
|
||||
|
||||
Reference in New Issue
Block a user