Add nginx-mainline modules

I’m using nginx-mainline and would like to be able to use the auth_request directive. However nginx-mainline is missing this module. Would it be possible to add a more complete list of modules that are compiled into nginx-mainline. I’ve pasted below a list of modules that are compiled into the nginx docker container but are missing from the nginx-mainline Clear Linux bundle. It would be good to add all of the following, but I could really use at least the auth_request module.

http_addition
http_auth_request
http_dav
http_flv
http_gunzip
http_gzip_static
http_mp4
http_random_index
http_secure_link
http_slice
http_stub_status
http_sub
mail_ssl
stream_realip
stream_ssl_preread

Yes! We can totally add these. Can you help, and give me the upstream project URL’s for these? Hunting down the actual location of these projects is a pain, since there doesn’t seem to be an official resource for these modules like PECL, pypy and CPAN has…

I believe these are modules that can be added simply by adding the corresponding “—with…” options to the configure command. The Nginx docker container is built with the following configure arguments. Note that these may not all be appropriate for the Clear Linux build, but the with-XXX-module arguments are the ones that should be added.

configure arguments:
  --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
  --with-perl_modules_path=/usr/lib/perl5/vendor_perl
  --user=nginx
  --group=nginx
  --with-compat
  --with-file-aio
  --with-threads
  --with-http_addition_module
  --with-http_auth_request_module
  --with-http_dav_module
  --with-http_flv_module
  --with-http_gunzip_module
  --with-http_gzip_static_module
  --with-http_mp4_module
  --with-http_random_index_module
  --with-http_realip_module
  --with-http_secure_link_module
  --with-http_slice_module
  --with-http_ssl_module
  --with-http_stub_status_module
  --with-http_sub_module
  --with-http_v2_module
  --with-mail
  --with-mail_ssl_module
  --with-stream
  --with-stream_realip_module
  --with-stream_ssl_module
  --with-stream_ssl_preread_module
  --with-cc-opt='-Os -fomit-frame-pointer'
  --with-ld-opt=-Wl,--as-needed

Oh! Yeah, I’ll try and enable these as much as we can.

Ahhh no! this is not how we build nginx. We build nginx modules out of tree and the docker container build you are looking at builds them in-tree.

The sources for these modules are not part of the nginx sources. I therefore need to still know the github/git project URL’s for each and every one of them, because … well, that’s how building starts :slight_smile:

If you download https://github.com/nginx/nginx/archive/release-1.17.8.tar.gz, and look at the contents, you will find sources for all of those modules. So I believe these are all part of the nginx sources. I do not believe that these modules can be compiled as dynamic modules. They need to be compiled into nginx. This means this is a change to the nginx-mainline bundle, not the nginx-mainline-extras bundle.

Well, I certainly overlooked that… I’m surprised these are all built in, tbh. I’ll go struggle with it some more :wink:

nginx-mainline-1.17.8-103 will have these, should be out in ~2 days.

2 Likes

Just verified it’s there. Thanks much.

1 Like