0

After searching for whole internet i didnt found anything on how to build all these together , there are tutorials for individual but not together so i tried on my own.

Error :

................................................................................
................................................................................
    -o objs/addon/modsecurity/ngx_http_modsecurity.o \
                /usr/local/src/modsecurity/ngx_http_modsecurity.c
        /usr/local/src/modsecurity/ngx_http_modsecurity.c:25:10: fatal error: api.h: No such file or directory
         #include "api.h"
                  ^~~~~~~
        compilation terminated.
        objs/Makefile:1627: recipe for target 'objs/addon/modsecurity/ngx_http_modsecurity.o' failed
        make[1]: *** [objs/addon/modsecurity/ngx_http_modsecurity.o] Error 1
        make[1]: Leaving directory '/root/nginx-1.15.8'
        Makefile:8: recipe for target 'build' failed
        make: *** [build] Error 2
        Error: Failure running 'make', exiting.

What I Did: (1) Automated pagespeed installation bash command

bash <(curl -f -L -sS https://ngxpagespeed.com/install) \
--nginx-version latest

(2)Configure Nginx with modules and retaining the directory paths, user and group names of pre-built NGINX binaries

--prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-http_ssl_module --with-http_v2_module --add-module=/usr/local/src/ngx_brotli --add-module=/usr/local/src/modsecurity

After this compilation began and after few minutes i got this error.
So my way of compiling is wrong or something wrong with modsecurity or any other thing ?
I checked complete directory of modsecurity but didnt found anything like api.h
OS : Ubuntu 18.04 LTS | ModSecurity: (2.9.3) latest version.

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.