I just installed nginx through apt-get repository. But, unfortunately HttpAuthDigestModule is not included while installing. This is how to install from source - ./configure --add-module=../samizdatco-nginx-http-auth-digest-xxxxxxx

How do I configure nginx that was installed?


TL;DR: You cannot add a module to the already-installed NGINX. Read on for why, and possible solutions.

The nginx package that is already installed on your system, whether from the main repositories or not, is already compiled with the modules set forth in the system. This goes for any of the nginx PPAs (from the nginx team), too. Since the binaries are already compiled with a set of modules, you can't "add" any modules to that without a bit more work.

To add the http-auth-digest module, you'll either have to find someone who can create a customized package for you in a PPA that you can use to update the software and make it work; create a customized Debian package for you with that module in it; or build, compile, and configure from source yourself.

Since 2016, NGINX has had support for Dynamic Modules. However, you need to precompile the dynamic module against the exact same version of NGINX that you're going to put the module into.

This requires that the module be written in the proper way to work as a dynamic module, but if it is, then you can technically compile it alongside the same NGINX instance, and then move the compiled module to another NGINX system of the same exact version. This, however, does not allow you to compile modules without compiling NGINX alongside it, so you still have to compile NGINX in order to get a usable dynamic module.

Dynamic module support, however, is not available in 16.04 as it required major packaging changes that were not available at the 16.04 release cycle, and therefore is only available in 16.10 and later.

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.