diff --git a/static/Focal/mod/Builder.sh b/static/Focal/mod/Builder.sh index d2542cd..89c97a5 100644 --- a/static/Focal/mod/Builder.sh +++ b/static/Focal/mod/Builder.sh @@ -32,49 +32,61 @@ cd /opt/mod/; git clone https://github.com/kyprizel/testcookie-nginx-module.git cd /opt/mod/; git clone https://github.com/google/ngx_brotli.git ngx_brotli; cd /opt/mod/ngx_brotli && git submodule update --init cd /opt/mod/; git clone --recurse-submodules https://github.com/wargio/naxsi.git naxsi +cd /opt/mod && wget https://github.com/PCRE2Project/pcre2/archive/refs/tags/pcre2-${FOCAL_PCRE}.tar.gz +cd /opt/mod && tar xf pcre2-${FOCAL_PCRE}.tar.gz; rm -Rf pcre2-${FOCAL_PCRE}.tar.gz +cd /opt/mod/pcre2-pcre2-${FOCAL_PCRE} && ./autogen.sh +cd /opt/mod && wget https://github.com/openssl/openssl/archive/refs/tags/OpenSSL_${FOCAL_OPENSSL}.tar.gz +cd /opt/mod && tar xf OpenSSL_${FOCAL_OPENSSL}.tar.gz; rm -Rf OpenSSL_${FOCAL_OPENSSL}.tar.gz + +cd /opt/mod && wget http://zlib.net/zlib-${FOCAL_ZLIB}.tar.gz +cd /opt/mod && tar xf zlib-${FOCAL_ZLIB}.tar.gz; rm -Rf zlib-${FOCAL_ZLIB}.tar.gz rm -Rf /opt/nginx-${NGINX}.tar.gz; cd /opt/; wget https://nginx.org/download/nginx-${NGINX}.tar.gz; tar xf nginx-${NGINX}.tar.gz; rm -Rf nginx-${NGINX}.tar.gz cd /opt/nginx-${NGINX} && curl -s https://raw.githubusercontent.com/hakasenyang/openssl-patch/master/nginx_hpack_push_1.15.3.patch > hpack_push.patch && patch -p1 < hpack_push.patch cd /opt/nginx-${NGINX}/ LUAJIT_LIB="/usr/local/LuaJIT/lib" LUAJIT_INC="/usr/local/LuaJIT/include/luajit-2.1/" ./configure --with-compat \ ---user=nginx \ ---group=nginx \ ---sbin-path=/usr/sbin/nginx \ ---conf-path=/nginx/nginx.conf \ ---pid-path=/var/run/nginx.pid \ ---lock-path=/var/run/nginx.lock \ ---error-log-path=/var/log/nginx/error.log \ ---http-log-path=/var/log/nginx/access.log \ ---with-threads \ ---with-file-aio \ ---with-http_ssl_module \ ---with-http_v2_module \ ---with-http_realip_module \ ---with-http_addition_module \ ---with-http_xslt_module \ ---with-http_image_filter_module \ ---with-http_geoip_module \ ---with-http_sub_module \ ---with-http_dav_module \ ---with-http_flv_module \ ---with-http_mp4_module \ ---with-http_gunzip_module \ ---with-http_gzip_static_module \ ---with-http_auth_request_module \ ---with-http_random_index_module \ ---with-http_secure_link_module \ ---with-http_slice_module \ ---with-http_stub_status_module \ ---with-mail \ ---with-mail_ssl_module \ ---with-stream \ ---with-stream_ssl_module \ ---with-stream_realip_module \ ---with-stream_geoip_module \ ---with-http_v2_hpack_enc \ +--user=nginx \ +--group=nginx \ +--sbin-path=/usr/sbin/nginx \ +--conf-path=/nginx/nginx.conf \ +--pid-path=/var/run/nginx.pid \ +--lock-path=/var/run/nginx.lock \ +--error-log-path=/var/log/nginx/error.log \ +--http-log-path=/var/log/nginx/access.log \ +--with-openssl=/opt/mod/openssl-OpenSSL_${JAMMY_OPENSSL} \ +--with-pcre \ +--with-pcre=/opt/mod/pcre2-pcre2-${JAMMY_PCRE} \ +--with-zlib=/opt/mod/zlib-${JAMMY_ZLIB} \ +--with-threads \ +--with-file-aio \ +--with-http_ssl_module \ +--with-http_v2_module \ +--with-http_realip_module \ +--with-http_addition_module \ +--with-http_xslt_module \ +--with-http_image_filter_module \ +--with-http_geoip_module \ +--with-http_sub_module \ +--with-http_dav_module \ +--with-http_flv_module \ +--with-http_mp4_module \ +--with-http_gunzip_module \ +--with-http_gzip_static_module \ +--with-http_auth_request_module \ +--with-http_random_index_module \ +--with-http_secure_link_module \ +--with-http_slice_module \ +--with-http_stub_status_module \ +--with-mail \ +--with-mail_ssl_module \ +--with-stream \ +--with-stream_ssl_module \ +--with-stream_realip_module \ +--with-stream_geoip_module \ +--with-http_v2_hpack_enc \ --with-cc-opt="-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fPIC" \ ---with-ld-opt="-Wl,-rpath,/usr/local/LuaJIT/lib -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -pie -lpcre" \ +--with-ld-opt="-Wl,-rpath,/usr/local/LuaJIT/lib -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -pie" \ --add-dynamic-module=/opt/mod/ngx_devel_kit-${NGX_DEVEL_KIT} \ --add-dynamic-module=/opt/mod/ModSecurity-nginx-${NGX_MODSECURITY} \ --add-dynamic-module=/opt/mod/headers-more-nginx-module-${NGX_HEADERS_MORE} \ @@ -87,3 +99,4 @@ LUAJIT_LIB="/usr/local/LuaJIT/lib" LUAJIT_INC="/usr/local/LuaJIT/include/luajit- --add-dynamic-module=/opt/mod/set-misc-nginx-module-${NGX_SET_MISC} \ --add-dynamic-module=/opt/mod/testcookie make -j`nproc` modules +rm -Rf /nginx/modules/*.so; cp /opt/nginx-${NGINX}/objs/*.so /nginx/modules/