owasp-modsecurity / ModSecurity-nginx

ModSecurity v3 Nginx Connector
Apache License 2.0
1.49k stars 277 forks source link

Mod security compile issue with nginx 1.14.0, missing http-headers-more-filter #259

Closed sahirmakkar closed 2 years ago

sahirmakkar commented 2 years ago

Hello Team,

I was trying to install the Modsecurity with Nginx 1.14.0 on Ubuntu 18.04 but I am unable to compile getting the following error.

./configure: error: no /build/nginx-H4cN7P/nginx-1.14.0/debian/modules/http-headers-more-filter/config was found

I checked all the required packages along with paths but didn't get much help from it.

Your help would be highly appreciated.

Configure Command image

After Executing ./configure

`./configure --with-cc-opt='-g -O2 -fdebug-prefix-map=/build/nginx-H4cN7P/nginx-1.14.0=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Wdate-time -D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fPIC' --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --modules-path=/usr/lib/nginx/modules --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-pcre-jit --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_v2_module --with-http_dav_module --with-http_slice_module --with-threads --with-http_addition_module --with-http_flv_module --with-http_geoip_module=dynamic --with-http_gunzip_module --with-http_gzip_static_module --with-http_image_filter_module=dynamic --with-http_mp4_module --with-http_perl_module=dynamic --with-http_random_index_module --with-http_secure_link_module --with-http_sub_module --with-http_xslt_module=dynamic --with-mail=dynamic --with-mail_ssl_module --with-stream=dynamic --with-stream_ssl_module --with-stream_ssl_preread_module --add-dynamic-module=/build/nginx-H4cN7P/nginx-1.14.0/debian/modules/http-headers-more-filter --add-dynamic-module=/build/nginx-H4cN7P/nginx-1.14.0/debian/modules/http-auth-pam --add-dynamic-module=/build/nginx-H4cN7P/nginx-1.14.0/debian/modules/http-cache-purge --add-dynamic-module=/build/nginx-H4cN7P/nginx-1.14.0/debian/modules/http-dav-ext --add-dynamic-module=/build/nginx-H4cN7P/nginx-1.14.0/debian/modules/http-ndk --add-dynamic-module=/build/nginx-H4cN7P/nginx-1.14.0/debian/modules/http-echo --add-dynamic-module=/build/nginx-H4cN7P/nginx-1.14.0/debian/modules/http-fancyindex --add-dynamic-module=/build/nginx-H4cN7P/nginx-1.14.0/debian/modules/nchan --add-dynamic-module=/build/nginx-H4cN7P/nginx-1.14.0/debian/modules/http-lua --add-dynamic-module=/build/nginx-H4cN7P/nginx-1.14.0/debian/modules/rtmp --add-dynamic-module=/build/nginx-H4cN7P/nginx-1.14.0/debian/modules/http-uploadprogress --add-dynamic-module=/build/nginx-H4cN7P/nginx-1.14.0/debian/modules/http-upstream-fair --add-dynamic-module=/build/nginx-H4cN7P/nginx-1.14.0/debian/modules/http-subs-filter

` image

mahajanankur commented 2 years ago

Same issue with me, I am trying to build Modsecurity with Nginx 1.14.0 on Ubuntu 18.04 but it's not compiling.

martinhsv commented 2 years ago

I just tried building ModSecurity on Ubuntu 18.04 with nginx 1.14.0 already installed, and I did not encounter any problems. The configure step completed without error and so did the build of ModSecurity:

I installed nginx from repository and built ModSecurity by doing a git clone from github.com/SpiderLabs/ModSecurity

martinhsv commented 2 years ago

@sahirmakkar ,

From what you have posted it looks like you are encountering a problem while trying to build nginx itself, not while building ModSecurity. If that is correct, then this isn't really the right forum for your question.

sahirmakkar commented 2 years ago

@martinhsv Thank you for your response. I am getting this issue on the AWS instance. Do you know the reason why it is happing over there only?

Thanks in anticipation.

martinhsv commented 2 years ago

Hi @sahirmakkar ,

Regarding my observation: "it looks like you are encountering a problem while trying to build nginx itself, not while building ModSecurity"

Please confirm/clarify:

Is it indeed the build of nginx itself where you are encountering difficulty?

sahirmakkar commented 2 years ago

Hi @martinhsv,

Yes, Your observation is right. I am able to build over my local instance but on my AWS instance, I am facing a build failure with nginx because of mentioned error.

martinhsv commented 2 years ago

I see.

In that case (as I noted previously) this isn't really the right forum for your inquiry. I would suggest reaching out to the nginx folks.