这个是不能改还是后续版本中可以开放
可以改桥接网络。修改compose文件重建
version: '3'
services:
openresty:
image: openresty/openresty:1.21.4.2-0-focal #对应架构镜像
container_name: ${CONTAINER_NAME}
restart: always
networks:
- 1panel-network
ports:
- "${PANEL_APP_PORT_HTTP}:80" # 改桥接网络模式,可手动改成 80:80
- "${PANEL_APP_PORT_HTTPS}:443" # 改桥接网络模式,可手动改成 443:443
volumes:
- ./conf/nginx.conf:/usr/local/openresty/nginx/conf/nginx.conf
- ./conf/fastcgi_params:/usr/local/openresty/nginx/conf/fastcgi_params
- ./conf/fastcgi-php.conf:/usr/local/openresty/nginx/conf/fastcgi-php.conf
- ./log:/var/log/nginx
- ./conf/conf.d:/usr/local/openresty/nginx/conf/conf.d/
- ./www:/www
- ./root:/usr/share/nginx/html
- /etc/localtime:/etc/localtime
labels:
createdBy: "Apps"
networks:
1panel-network:
external: true
nginx配置文件的端口也要随动
是的,和容器外部监听端口要一致
它检测的80端口,你都监听其他端口了,当然会有问题。
正常能跑就行,不要在意其他细节