angristan / nginx-autoinstall

Compile NGINX from source with custom modules and patches on Debian and Ubuntu
GNU General Public License v3.0
636 stars 237 forks source link

Move options and modules to headless #235

Closed tmiland closed 2 years ago

tmiland commented 2 years ago

Tested with:

HEADLESS=y \
NGINX_VER=MAINLINE \
PAGESPEED=y \
BROTLI=y \
HEADERMOD=y \
FANCYINDEX=y \
CACHEPURGE=y \
SUBFILTER=y \
LUA=y \
WEBDAV=y \
VTS=y \
RTMP=y \
TESTCOOKIE=y \
REDIS2=y \
HTTPREDIS=y \
SRCACHE=y \
SETMISC=y \
NGXECHO=y \
NGINX_MAINLINE_VER=1.21.6 \
NGINX_STABLE_VER=1.20.1 \
LIBRESSL_VER=3.3.1 \
OPENSSL_VER=1.1.1l \
NPS_VER=1.13.35.2 \
HEADERMOD_VER=0.33 \
LIBMAXMINDDB_VER=1.4.3 \
GEOIP2_VER=3.3 \
LUA_JIT_VER=2.1-20220310 \
LUA_NGINX_VER=0.10.21rc2 \
LUA_RESTYCORE_VER=0.1.23rc1 \
LUA_RESTYLRUCACHE_VER=0.11 \
NGINX_DEV_KIT=0.3.1 \
HTTPREDIS_VER=0.3.9 \
NGXECHO_VER=0.62 \
NGINX_OPTIONS="
  --prefix=/etc/nginx \
  --sbin-path=/usr/sbin/nginx \
  --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 \
  --user=nginx \
  --group=nginx \
  --with-cc-opt=-Wno-deprecated-declarations \
  --with-cc-opt=-Wno-ignored-qualifiers" \
NGINX_MODULES="--with-threads \
  --with-file-aio \
  --with-http_ssl_module \
  --with-http_v2_module \
  --with-http_mp4_module \
  --with-http_auth_request_module \
  --with-http_slice_module \
  --with-http_stub_status_module \
  --with-http_realip_module \
  --with-http_sub_module \
  --add-module=/usr/local/src/nginx-custom-modules/nginx-http-rdns" \
./nginx-autoinstall.sh 2>&1 | tee nginx-installer.log

Also tested with:

HEADLESS=y \
NGINX_VER=MAINLINE \
NGINX_MODULES="--with-threads \
  --with-file-aio \
  --with-http_ssl_module \
  --with-http_v2_module \
  --with-http_mp4_module \
  --with-http_auth_request_module \
  --with-http_slice_module \
  --with-http_stub_status_module \
  --with-http_realip_module \
  --with-http_sub_module \
  --add-module=/usr/local/src/nginx-custom-modules/nginx-http-rdns" \
./nginx-autoinstall.sh 2>&1 | tee nginx-installer.log

Confirm custom module:

$ nginx -V 2>&1 | grep 'nginx-http-rdns' -o
nginx-http-rdns

Should be able to load dynamic modules as well. (not tested)

closes #116 closes #196 closes #197

MakFred86 commented 2 years ago

@tmiland Unfortunately no headless installation doesn't work anymore, because with this commit the default version numbers were removed for the regular installation.

https://github.com/angristan/nginx-autoinstall/pull/235/commits/d26b8bc59d7de827f70e55cf0867a982a89d91d2#diff-f73d8746758a5f32f1fbcd0238d0d6ab667cf66d54e257000bd7b3d93853254cL10-L24

tmiland commented 2 years ago

@tmiland Unfortunately no headless installation doesn't work anymore, because with this commit the default version numbers were removed for the regular installation.

https://github.com/angristan/nginx-autoinstall/pull/235/commits/d26b8bc59d7de827f70e55cf0867a982a89d91d2#diff-f73d8746758a5f32f1fbcd0238d0d6ab667cf66d54e257000bd7b3d93853254cL10-L24

I see, I'll have a look.

tmiland commented 2 years ago

Okay @MakFred86, fixed in https://github.com/angristan/nginx-autoinstall/pull/236

*Edit Thanks for the notice, was too focused on the headless part and missed testing non-headless 🤦‍♂️