Closed javiercasares closed 11 months ago
i guess, that the only option you have is to manually build it since the module you have installed is for the distro package and not for that user launchpad repo.
Try this
wget http://nginx.org/download/nginx-1.21.6.tar.gz
wget https://github.com/nbs-system/naxsi/archive/master.zip
unzip master.zip
tar xzf nginx-1.21.6.tar.gz
./configure \
--conf-path=/etc/nginx/nginx.conf \
--add-module=../naxsi-master/naxsi_src/ \
--error-log-path=/var/log/nginx/error.log \
--http-client-body-temp-path=/var/lib/nginx/body \
--http-fastcgi-temp-path=/var/lib/nginx/fastcgi \
--http-log-path=/var/log/nginx/access.log \
--http-proxy-temp-path=/var/lib/nginx/proxy \
--http-scgi-temp-path=/var/lib/nginx/scgi \
--http-uwsgi-temp-path=/var/lib/nginx/uwsgi \
--lock-path=/var/lock/nginx.lock \
--pid-path=/var/run/nginx.pid \
--user=www-data \
--group=www-data \
--with-debug \
--with-compat \
--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_gunzip_module \
--with-http_gzip_static_module \
--with-http_image_filter_module=dynamic \
--with-http_sub_module \
--with-http_xslt_module=dynamic \
--with-stream=dynamic \
--with-stream_ssl_module \
--with-mail=dynamic \
--with-mail_ssl_module \
--prefix=/usr
I'm executing:
and I'm getting:
nginx: [emerg] module "/usr/share/nginx/modules/ngx_http_naxsi_module.so" version 1018000 instead of 1020001 in /etc/nginx/modules-enabl...
Looking at the versions, I get that 1018000 is nginx 1.18, and 1020001 is nginx 1.20...
I'm using this nginx version https://launchpad.net/~ondrej/+archive/ubuntu/nginx