当前版本:1.10.5-lts
升级成1.10.5-lts并同时升级openresty为最新版后网站管理出现bug,暂停和启动网站时出现以下错误:
服务内部错误: stderr: 2024/04/19 22:09:54 [emerg] 49#49: open() "/usr/local/openresty/1pwaf/data/conf/waf.conf" failed (2: No such file or directory) in /usr/local/openresty/nginx/conf/nginx.conf:34 nginx: [emerg] open() "/usr/local/openresty/1pwaf/data/conf/waf.conf" failed (2: No such file or directory) in /usr/local/openresty/nginx/conf/nginx.conf:34 nginx: configuration file /usr/local/openresty/nginx/conf/nginx.conf test failed
经过排查后发现容器并没有将/opt/1panel/apps/openresty/OpenResty/1pwaf
挂载在/usr/local/openresty/1pwaf
这个目录,导致无法读取这两个文件。
手动挂载后出现nginx: [emerg] lua_shared_dict "waf_req_count" is already defined as "waf_req_count" in /usr/local/openresty/1pwaf/data/conf/waf.conf:1 2024/04/19 22:20:20 [emerg] 1#1: lua_shared_dict "waf_req_count" is already defined as "waf_req_count" in /usr/local/openresty/1pwaf/data/conf/waf.conf:1
删除挂载后又出现nginx: [emerg] open() "/usr/local/openresty/1pwaf/data/conf/waf.conf" failed (2: No such file or directory) in /usr/local/openresty/nginx/conf/nginx.conf:34 2024/04/19 22:23:34 [emerg] 1#1: open() "/usr/local/openresty/1pwaf/data/conf/waf.conf" failed (2: No such file or directory) in /usr/local/openresty/nginx/conf/nginx.conf:34 nginx: [emerg] open() "/usr/local/openresty/1pwaf/data/conf/waf.conf" failed (2: No such file or directory) in /usr/local/openresty/nginx/conf/nginx.conf:34
并且之前发现旧的容器在经过某些有break change的镜像升级后设置依然为旧版应用的设置,而没有改为新版设置(例如gitea的GITEA__database__HOST
环境变量)