owasp-modsecurity / ModSecurity

ModSecurity is an open source, cross platform web application firewall (WAF) engine for Apache, IIS and Nginx. It has a robust event-based programming language which provides protection from a range of attacks against web applications and allows for HTTP traffic monitoring, logging and real-time analysis.
https://www.modsecurity.org
Apache License 2.0
8.3k stars 1.61k forks source link

Nginx start failed cause ngx_http_modsecurity_module.so #3281

Closed territestgogo closed 1 month ago

territestgogo commented 1 month ago

On my Host Machine, I installed ModSecurity from source (using compile and make). After that, I installed ModSecurity and Nginx version 1.24.0 with the connector to create the ngx_http_modsecurity.so file. The file was successfully created without any errors.

On my Client Machine, I installed Nginx version 1.24.0 and tried to use this ngx_http_modsecurity.so file from Host Machine. However, an error occurred: :dlopen() /etc/nginx/modules/ngx_http_modsecurity_module.so: undefined symbol: pcre_malloc, and Nginx failed to start.

Note: I tried installing Nginx directly on the Host Machine, and everything worked fine. Both machines are running Nginx version 1.24.0, Ubuntu Server 24.04

Can someone help me with this issue? Thank you very much!

territestgogo commented 1 month ago

Update: i fix it, the libmodsecurity3.so via apt-get install not same with libmodsecurity3.so via source code build

territestgogo commented 1 month ago

Done !!!