owasp-modsecurity/ModSecurity-nginx

getting error while starting ngnix server

gk6301965 opened this issue · 4 comments

"/usr/share/nginx/modules/ngx_http_modsecurity_module.so" version 1019001 instead of 1018000 in /etc/nginx/nginx.conf
Above is the error I am getting plaese help

Hello @gk6301965 ,

That sort of error message can appear if you have mismatched versions of nginx.

I.e. if the version of nginx that you are running (e.g. nginx -v) does not match the version of nginx that was used when the ngx_http_modsecurity_module was built.

Hello @gk6301965 ,

That sort of error message can appear if you have mismatched versions of nginx.

I.e. if the version of nginx that you are running (e.g. nginx -v) does not match the version of nginx that was used when the ngx_http_modsecurity_module was built.

but how to slove this

When you are following instructions for the ModSecurity-nginx connector, there will be a step where you download the nginx source. This will be where you do make modules The version of the source code that you downloaded must be the same as the version of nginx that you are actually running.

See for example https://www.nginx.com/blog/compiling-and-installing-modsecurity-for-open-source-nginx/#4 %E2%80%93-Download-the-NGINX-Connector-for-ModSecurity-and-Compile-It-as-a-Dynamic-Module

Closing due to no further feedback.