Skip to content

Commit

Permalink
move to freenginx
Browse files Browse the repository at this point in the history
Signed-off-by: Zoey <[email protected]>
  • Loading branch information
Zoey2936 authored Apr 26, 2024
1 parent f19ddc0 commit dd5b81e
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@ RUN git clone --recursive https://github.com/owasp-modsecurity/ModSecurity --bra
make -j "$(nproc)" install && \
strip -s /usr/local/modsecurity/lib/libmodsecurity.so.3
# Nginx
RUN wget -q https://nginx.org/download/nginx-"$NGINX_VER".tar.gz -O - | tar xzC /src && \
mv /src/nginx-"$NGINX_VER" /src/nginx && \
wget -q https://raw.githubusercontent.com/nginx-modules/ngx_http_tls_dyn_size/master/nginx__dynamic_tls_records_"$DTR_VER"%2B.patch -O /src/nginx/1.patch && \
wget -q https://raw.githubusercontent.com/openresty/openresty/master/patches/nginx-"$RCP_VER"-resolver_conf_parsing.patch -O /src/nginx/2.patch && \
sed -i "s|nginx/|NPMplus/|g" /src/nginx/src/core/nginx.h && \
sed -i "s|Server: nginx|Server: NPMplus|g" /src/nginx/src/http/ngx_http_header_filter_module.c && \
sed -i "s|<hr><center>nginx</center>|<hr><center>NPMplus</center>|g" /src/nginx/src/http/ngx_http_special_response.c && \
cd /src/nginx && \
patch -p1 </src/nginx/1.patch && \
patch -p1 </src/nginx/2.patch && \
rm /src/nginx/*.patch && \
RUN wget -q https://freenginx.org/download/freenginx-"$NGINX_VER".tar.gz -O - | tar xzC /src && \
mv /src/freenginx-"$NGINX_VER" /src/freenginx && \
wget -q https://raw.githubusercontent.com/nginx-modules/ngx_http_tls_dyn_size/master/nginx__dynamic_tls_records_"$DTR_VER"%2B.patch -O /src/freenginx/1.patch && \
wget -q https://raw.githubusercontent.com/openresty/openresty/master/patches/nginx-"$RCP_VER"-resolver_conf_parsing.patch -O /src/freenginx/2.patch && \
sed -i "s|freenginx/|NPMplus/|g" /src/freenginx/src/core/nginx.h && \
sed -i "s|Server: freenginx|Server: NPMplus|g" /src/freenginx/src/http/ngx_http_header_filter_module.c && \
sed -i "s|<hr><center>freenginx</center>|<hr><center>NPMplus</center>|g" /src/freenginx/src/http/ngx_http_special_response.c && \
cd /src/freenginx && \
patch -p1 </src/freenginx/1.patch && \
patch -p1 </src/freenginx/2.patch && \
rm /src/freenginx/*.patch && \
# modules
git clone --recursive https://github.com/google/ngx_brotli --branch "$NB_VER" /src/ngx_brotli && \
git clone --recursive https://github.com/aperezdc/ngx-fancyindex --branch "$NF_VER" /src/ngx-fancyindex && \
Expand All @@ -66,8 +66,8 @@ RUN wget -q https://nginx.org/download/nginx-"$NGINX_VER".tar.gz -O - | tar xzC
git clone --recursive https://github.com/openresty/lua-resty-lrucache --branch "$LRL_VER" /src/lua-resty-lrucache && \
git clone --recursive https://github.com/leev/ngx_http_geoip2_module --branch "$NHG2M_VER" /src/ngx_http_geoip2_module
# Configure
RUN cd /src/nginx && \
/src/nginx/configure \
RUN cd /src/freenginx && \
/src/freenginx/configure \
--build="$BUILD" \
--with-compat \
--with-threads \
Expand Down

0 comments on commit dd5b81e

Please sign in to comment.