NGINX 1.9.11 released a new feature that will come very handy called Dynamic Modules which will load the NGINX modules on runtime instead of on build as it used to be.

Previously if you wanted to use a module you had to compile it into NGINX source installation and if you used it or not the module was loaded every time.

As of now you still need to compile NGINX with the modules when you install from source, but as you do you it creates a new shared object for each dynamically loaded module. Then in the configuration file you can enable or disabled this modules at runtime.

So far only 5 modules have been converted to dynamic modules.

GeoIP Module

Image Filter Module

Mail Module

Stream Module

XSLT Module

If you want to load these modules as dynamic modules you need to append =dynamic to the –with argument like this:



./configure --with-http_geoip_module=dynamic \

--with-http_xslt_module=dynamic \

--with-mail=dynamic \

--with-http_image_filter_module=dynamic \

--with-stream=dynamic

After you install NGINX from source there will be a subfolder that is located at “/usr/local/nginx/modules”by default, where all of your compiled modules will be with the extension “.so”. You can then enable the modules by editing the configuration file and adding the following code into the main area of your nginx.conf file and restarting NGINX.

load_module "modules/module_name.so";

NGINX PLUS will have a managed modules repository with certified third-party modules, that will make it easy to add modules to NGINX.

Currently you still need to compile NGINX with the modules, but in the future we will be able to add modules after NGINX installation.

This entry was posted in Web Development, Web Hosting. Bookmark the permalink.