chore(docker): 增加支持websocket转发功能,PHP容器不暴漏端口到主机

This commit is contained in:
2025-12-19 15:32:34 +08:00
parent 498122f57e
commit ba5c2239ac
10 changed files with 35 additions and 20 deletions

View File

@@ -0,0 +1,7 @@
location /ws {
proxy_pass http://php-fpm:8080;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
}

View File

@@ -24,6 +24,9 @@
include conf.c/enable-php-74.conf;
#PHP-INFO-END
# 启用 WebSocket 支持
include conf.c/enable-websocket.conf;
# --- REWRITE-START --- URL重写规则引用,修改后将导致面板设置的伪静态规则失效
# include /www/server/panel/vhost/rewrite/xcx30.5g-quickapp.com.conf; # 等于下面的内容
location / {