新版本openresty无法使用1Panel高级功能的WAF

openwrt系统,linkease/istorepanel:latest镜像启动的1Panel。
1panel/openresty:1.27.1.2-0-1-focal镜像在不修改配置文件的情况下启动容器会报错:

 [warn] 1#1: the "listen ... http2" directive is deprecated, use the "http2" directive instead in /usr/local/openresty/nginx/conf/conf.d/00.default.conf:8
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /usr/local/openresty/nginx/conf/conf.d/00.default.conf:8
 [notice] 1#1: [lua] config.lua:136: ini_waf_info(): Load 1Panel WAF Version:1.0.0
nginx: [error] [lua] file.lua:191: ensure_dir_exists(): Failed to create directory:No such file or directory
nginx: [error] [lua] file.lua:191: ensure_dir_exists(): Failed to create directory:No such file or directory
 [error] 1#1: [lua] file.lua:191: ensure_dir_exists(): Failed to create directory:No such file or directory
 [error] 1#1: [lua] file.lua:191: ensure_dir_exists(): Failed to create directory:No such file or directory
 [error] 1#1: init_by_lua_file error: ./config.lua:183: attempt to index field 'log' (a nil value)
stack traceback:
	./config.lua:183: in function 'init_global_config'
	./config.lua:252: in function 'load_config_file'
	./init.lua:6: in main chunk
nginx: [error] init_by_lua_file error: ./config.lua:183: attempt to index field 'log' (a nil value)
stack traceback:
	./config.lua:183: in function 'init_global_config'
	./config.lua:252: in function 'load_config_file'
	./init.lua:6: in main chunk

1panel/openresty:1.25.3.2-0-1-focal镜像在不修改配置文件的情况下容器可以正常启动,但是开启WAF后网站报错500 Internal Server Error,关闭WAF后网站正常运行。容器日志如下:

 [warn] 1#1: the "listen ... http2" directive is deprecated, use the "http2" directive instead in /usr/local/openresty/nginx/conf/conf.d/00.default.conf:8
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /usr/local/openresty/nginx/conf/conf.d/00.default.conf:8
 [notice] 1#1: [lua] config.lua:143: ini_waf_info(): Load 1Panel WAF Version:1.0.0
 [error] 1#1: [lua] file.lua:168: ensure_dir_exists(): Failed to create directory:No such file or directory
 [error] 1#1: [lua] file.lua:168: ensure_dir_exists(): Failed to create directory:No such file or directory
nginx: [error] [lua] file.lua:168: ensure_dir_exists(): Failed to create directory:No such file or directory
nginx: [error] [lua] file.lua:168: ensure_dir_exists(): Failed to create directory:No such file or directory
 [error] 1#1: [lua] file.lua:17: read_rule(): Failed to open file /usr/local/openresty/1pwaf/data/rules/urlcc.json: No such file or directory
nginx: [error] [lua] file.lua:17: read_rule(): Failed to open file /usr/local/openresty/1pwaf/data/rules/urlcc.json: No such file or directory
nginx: [error] [lua] db_init.lua:41: init_db_config(): failed to open db /usr/local/openresty/1pwaf/data/db/global/location.db
 [error] 1#1: [lua] db_init.lua:41: init_db_config(): failed to open db /usr/local/openresty/1pwaf/data/db/global/location.db
 [notice] 1#1: using the "epoll" event method
 [notice] 1#1: openresty/1.25.3.2
 [notice] 1#1: built by gcc 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.2) 
 [notice] 1#1: OS: Linux 6.12.21
 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
 [notice] 1#1: start worker processes
 [notice] 1#1: start worker process 9
 [notice] 1#1: start worker process 10
 [notice] 1#1: start worker process 11
 [notice] 1#1: start worker process 12
 [notice] 1#1: signal 1 (SIGHUP) received from 19, reconfiguring
 [notice] 1#1: reconfiguring
 [warn] 1#1: the "listen ... http2" directive is deprecated, use the "http2" directive instead in /usr/local/openresty/nginx/conf/conf.d/00.default.conf:8
 [notice] 1#1: [lua] config.lua:143: ini_waf_info(): Load 1Panel WAF Version:1.0.0
 [error] 1#1: [lua] file.lua:17: read_rule(): Failed to open file /usr/local/openresty/1pwaf/data/rules/urlcc.json: No such file or directory
 [notice] 1#1: using the "epoll" event method
 [notice] 1#1: start worker processes
 [notice] 1#1: start worker process 31
 [notice] 1#1: start worker process 32
 [notice] 1#1: start worker process 33
 [notice] 1#1: start worker process 34
 [notice] 9#9: gracefully shutting down

1panel/openresty:1.21.4.3-3-3-focal镜像的容器可以正常启动,网站和WAF可以正常运行。容器日志:

 [notice] 1#1: [lua] config.lua:126: ini_waf_info(): Load 1Panel WAF Version:1.0.0
nginx: [error] [lua] file.lua:129: ensure_dir_exists(): Failed to create directory:No such file or directory
 [error] 1#1: [lua] file.lua:129: ensure_dir_exists(): Failed to create directory:No such file or directory
nginx: [error] [lua] db.lua:126: init(): init waf_stat status0
 [error] 1#1: [lua] db.lua:126: init(): init waf_stat status0
 [error] 1#1: [lua] db.lua:160: init(): init req_logs status0
nginx: [error] [lua] db.lua:160: init(): init req_logs status0
 [error] 1#1: [lua] db.lua:178: init(): init block_ip status0
nginx: [error] [lua] db.lua:178: init(): init block_ip status0
 [notice] 1#1: using the "epoll" event method
 [notice] 1#1: openresty/1.21.4.3
 [notice] 1#1: built by gcc 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.2) 
 [notice] 1#1: OS: Linux 6.12.21
 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
 [notice] 1#1: start worker processes
 [notice] 1#1: start worker process 9
 [notice] 1#1: start worker process 10
 [notice] 1#1: start worker process 11
 [notice] 1#1: start worker process 12
 [notice] 1#1: signal 1 (SIGHUP) received from 19, reconfiguring
 [notice] 1#1: reconfiguring
 [notice] 1#1: [lua] config.lua:126: ini_waf_info(): Load 1Panel WAF Version:1.0.0
 [error] 1#1: [lua] db.lua:264: init_website_monitor(): init default.wm26.top site_stat table status0
 [notice] 1#1: using the "epoll" event method
 [notice] 1#1: start worker processes
 [notice] 1#1: start worker process 25
 [notice] 1#1: start worker process 26
 [notice] 1#1: start worker process 27
 [notice] 1#1: start worker process 28
 [notice] 9#9: gracefully shutting down

能否让1.27.1.2-0-1-focal及更新版本的1panel/openresty支持1Panel面板的WAF功能?
新版openresty修复了许多错误和漏洞,更想用新版。1Panel的WAF也足够满足我的需求,不打算再折腾其他WAF。

不好意思 我们当前还没有适配 openwrt

这个错误会发生是因为系统是openwrt吗?

也有可能是文件的问题 openwrt 现在无法自动安装应用商店的应用
需要把挂载的目录改为全路径