/data/server/nginx-1.14/sbin/nginx -V
nginx version: JYWS/2.1.0
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC)
built with OpenSSL 1.1.0h 27 Mar 2018
TLS SNI support enabled
configure arguments: --prefix=/data/server/nginx-1.14 --with-http_v2_module --with-stream --with-http_gunzip_module --with-http_ssl_module --with-threads --with-file-aio --with-http_realip_module --with-http_gzip_static_module --with-http_stub_status_module --with-http_image_filter_module --with-http_auth_request_module --with-http_random_index_module --with-ld-opt=-Wl,-rpath,/usr/local/luajit/lib --with-pcre=/data/server/nginx-waf/module/pcre-8.42 --with-zlib=/data/server/nginx-waf/module/zlib-1.2.11 --with-openssl=/data/server/nginx-waf/module/openssl-1.1.0h --add-module=/data/server/nginx-waf/module/lua-nginx-module-0.10.12 --add-module=/data/server/nginx-waf/module/ngx_devel_kit-0.2.19 --add-module=/data/server/nginx-waf/module/nginx-sticky-module-1.2.5 --add-module=/data/server/nginx-waf/module/echo-nginx-module-0.61 --add-module=/data/server/nginx-waf/module/ngx_cache_purge-2.3 --add-module=/data/server/nginx-waf/module/ngx_http_lower_upper_case --add-module=/data/server/nginx-waf/module/ModSecurity-nginx
以上是整合了luajit以及nginx-lua-module模块,添加了openwaf的配置后报错:
# /data/server/nginx-1.14/sbin/nginx -t
nginx: the configuration file /data/server/nginx-1.14/conf/nginx.conf syntax is ok
nginx: [error] init_by_lua_file error: /opt/OpenWAF/app/twaf_init.lua:3: module 'resty.core' not found:
no field package.preload['resty.core']
no file '/opt/OpenWAF/resty/core.lua'
no file './resty/core.lua'
no file '/usr/local/luajit/share/luajit-2.0.5/resty/core.lua'
no file '/usr/local/share/lua/5.1/resty/core.lua'
no file '/usr/local/share/lua/5.1/resty/core/init.lua'
no file '/usr/local/luajit/share/lua/5.1/resty/core.lua'
no file '/usr/local/luajit/share/lua/5.1/resty/core/init.lua'
no file '/opt/OpenWAF/lib/resty/resty/core.so'
no file './resty/core.so'
no file '/usr/local/lib/lua/5.1/resty/core.so'
no file '/usr/local/luajit/lib/lua/5.1/resty/core.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
no file '/opt/OpenWAF/lib/resty/resty.so'
no file './resty.so'
no file '/usr/local/lib/lua/5.1/resty.so'
no file '/usr/local/luajit/lib/lua/5.1/resty.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
[C]: in function 'require'
/opt/OpenWAF/app/twaf_init.lua:3: in main chunk
nginx: configuration file /data/server/nginx-1.14/conf/nginx.conf test failed
/data/server/nginx-1.14/sbin/nginx -V
nginx version: JYWS/2.1.0
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC)
built with OpenSSL 1.1.0h 27 Mar 2018
TLS SNI support enabled
configure arguments: --prefix=/data/server/nginx-1.14 --with-http_v2_module --with-stream --with-http_gunzip_module --with-http_ssl_module --with-threads --with-file-aio --with-http_realip_module --with-http_gzip_static_module --with-http_stub_status_module --with-http_image_filter_module --with-http_auth_request_module --with-http_random_index_module --with-ld-opt=-Wl,-rpath,/usr/local/luajit/lib --with-pcre=/data/server/nginx-waf/module/pcre-8.42 --with-zlib=/data/server/nginx-waf/module/zlib-1.2.11 --with-openssl=/data/server/nginx-waf/module/openssl-1.1.0h --add-module=/data/server/nginx-waf/module/lua-nginx-module-0.10.12 --add-module=/data/server/nginx-waf/module/ngx_devel_kit-0.2.19 --add-module=/data/server/nginx-waf/module/nginx-sticky-module-1.2.5 --add-module=/data/server/nginx-waf/module/echo-nginx-module-0.61 --add-module=/data/server/nginx-waf/module/ngx_cache_purge-2.3 --add-module=/data/server/nginx-waf/module/ngx_http_lower_upper_case --add-module=/data/server/nginx-waf/module/ModSecurity-nginx
以上是整合了luajit以及nginx-lua-module模块,添加了openwaf的配置后报错:
# /data/server/nginx-1.14/sbin/nginx -t
nginx: the configuration file /data/server/nginx-1.14/conf/nginx.conf syntax is ok
nginx: [error] init_by_lua_file error: /opt/OpenWAF/app/twaf_init.lua:3: module 'resty.core' not found:
no field package.preload['resty.core']
no file '/opt/OpenWAF/resty/core.lua'
no file './resty/core.lua'
no file '/usr/local/luajit/share/luajit-2.0.5/resty/core.lua'
no file '/usr/local/share/lua/5.1/resty/core.lua'
no file '/usr/local/share/lua/5.1/resty/core/init.lua'
no file '/usr/local/luajit/share/lua/5.1/resty/core.lua'
no file '/usr/local/luajit/share/lua/5.1/resty/core/init.lua'
no file '/opt/OpenWAF/lib/resty/resty/core.so'
no file './resty/core.so'
no file '/usr/local/lib/lua/5.1/resty/core.so'
no file '/usr/local/luajit/lib/lua/5.1/resty/core.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
no file '/opt/OpenWAF/lib/resty/resty.so'
no file './resty.so'
no file '/usr/local/lib/lua/5.1/resty.so'
no file '/usr/local/luajit/lib/lua/5.1/resty.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
[C]: in function 'require'
/opt/OpenWAF/app/twaf_init.lua:3: in main chunk
nginx: configuration file /data/server/nginx-1.14/conf/nginx.conf test failed