chore(docker): 增加支持websocket转发功能,PHP容器不暴漏端口到主机
This commit is contained in:
7
docker/nginx/conf.c/enable-websocket.conf
Normal file
7
docker/nginx/conf.c/enable-websocket.conf
Normal 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;
|
||||
}
|
||||
@@ -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 / {
|
||||
|
||||
Reference in New Issue
Block a user