0

I am trying to compile modsecurity 2.7.7 (this download link) along with nging 1.15.8 but I am having issues where it will not compile.

Commands used when compiling modsecurity:

./autogen.sh
./configure --enable-standalone-module

This is the error I am getting when I compile.

objs/Makefile:1278: recipe for target 'objs/addon/modsecurity/ngx_http_modsecurity.o' failed
make[1]: Leaving directory '/work-disk/server_setup/compile_nginx/nginx'
Makefile:11: recipe for target 'install' failed
STDERR: /work-disk/server_setup/compile_nginx/mod_security/nginx/modsecurity/ngx_http_modsecurity.c: In function ‘ngx_http_modsecurity_save_request_body’:
/work-disk/server_setup/compile_nginx/mod_security/nginx/modsecurity/ngx_http_modsecurity.c:531:15: error: ‘ngx_http_connection_t {aka struct <anonymous>}’ has no member named ‘nfree’
         if (hc->nfree && size == cscf->large_client_header_buffers.size) {
               ^
/work-disk/server_setup/compile_nginx/mod_security/nginx/modsecurity/ngx_http_modsecurity.c:533:32: error: ‘ngx_http_connection_t {aka struct <anonymous>}’ has no member named ‘nfree’
             buf = hc->free[--hc->nfree];
                                ^
make[1]: *** [objs/addon/modsecurity/ngx_http_modsecurity.o] Error 1
make: *** [build] Error 2
/work-disk/server_setup/compile_nginx/mod_security/nginx/modsecurity/ngx_http_modsecurity.c: In function ‘ngx_http_modsecurity_save_request_body’:
/work-disk/server_setup/compile_nginx/mod_security/nginx/modsecurity/ngx_http_modsecurity.c:531:15: error: ‘ngx_http_connection_t {aka struct <anonymous>}’ has no member named ‘nfree’
         if (hc->nfree && size == cscf->large_client_header_buffers.size) {
               ^
/work-disk/server_setup/compile_nginx/mod_security/nginx/modsecurity/ngx_http_modsecurity.c:533:32: error: ‘ngx_http_connection_t {aka struct <anonymous>}’ has no member named ‘nfree’
             buf = hc->free[--hc->nfree];
                                ^
make[1]: *** [objs/addon/modsecurity/ngx_http_modsecurity.o] Error 1
make: *** [install] Error 2
  • @JamesShewey I ended up sorta solving it but haven't updated until I solve it fully but what I have figured out is the issue was not nginx or mod security of pagespeed but instead was a conflict of the 3 together with the versions I have – Josh Kirby Jan 4 at 14:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.