• Home
  • WordPress
  • web Hosting
  • linux
  • mysql
  • nginx
  • apache2
  • devops

Raju Ginni

wordpress tutorials seo hosting etc

You are here: Home / nginx server tutorials (installation, configuration, performance tuning, security) / nginx modules list (enable, disable, upgrade, install dynamic module)

nginx modules list (enable, disable, upgrade, install dynamic module)

Table of Contents

Toggle
  • how to view loaded modules in nginx
  • static modules:
  • dynamic modules:
  • how to install dynamic module in nginx?
    • #1 download nginx
    • #2 download dynamic module
    • #2.1 install build tools if not already
    • #3 compile dynamic module
    • #4. verify the module & copy to nginx directory
    • #5 upgrade nginx if not done early
    • #6 edit nginx.conf
  • enable & disable dynamic module in nginx
    • nginx modules location
  • Install nginx without unnecessary  modules
  • Nginx http core module
    • nginx fastcgi module
    • nginx proxy module
    • best modules for nginx third party
    • how to enable brotli compression in nginx
    • Nginx modules which are installed by default
  • How do I see what modules are installed in nginx?
  • What are dynamic modules in nginx?

how to view loaded modules in nginx

command
nginx-V
it will list nginx version with compiled modules, while installing a module.

static modules:

installed along with nginx install, no way to disable or enable like Apache.

dynamic modules:

available in nginx plus and newer nginx version.
step 1: compile nginx module in same environment like production server.
2nd: test server: used to compile the module. after compiled module available,
3rd: we have to copy the module end .so
/etc/nginx/modules (or other path).
and include in nginx.conf
Loadmodule /path/to-module
nginx module instead of error fix.
if you are using this dynamic module, you will get this (,upgrade failed).
because dynamic module has to recompile along with new nginx version.
/etc/nginx/modules/ngx_http_geoip_module.so
don’t restart or reboot(if nginx unable to start until problem fixed)
temporary fix: unload module by commenting in nginx.conf & start the upgrade
permanent fix: recompile the module with new nginx version /current nginx version.

how to install dynamic module in nginx?

check your nginx version
nginx -v
or upgrade to latest version.
then type nginx -v
download latest version of nginx it should match current production server

#1 download nginx

wget -qO – http://nginx.org/download/nginx-1.18.10.tar.gz | tar zxfv –

#2 download dynamic module

git clone https://github.com/perusio/nginx-hello-world-module.git

#2.1 install build tools if not already

sudo apt-get install unzip gcc make libpcre3-dev zlib1g-dev

#3 compile dynamic module

company & make modules command
cd nginx-1.11.10/
./configure –with-compat –add-dynamic-module=../nginx-hello-world-module
$ make modules

#4. verify the module & copy to nginx directory

by default its available in objs subdirectory
ls objs/*.so
objs/ngx_http_hello_world.so
cp objs/ngx_http_hello_world.so /etc/nginx/modules

#5 upgrade nginx if not done early

service nginx upgrade

#6 edit nginx.conf

loadmodule
,& reload nginx
if you are building it in production server.
it’s better to compile in build environment & copy to production server.
mycase: I already did in production server (but downtime important in case of high traffic)

enable & disable dynamic module in nginx

edit conf file
comment or uncomment
reload nginx server.
also read pagespeed module in nginx as dynamic.
module configuration file would be in nginx.conf or
conf.d modulename.conf

nginx modules location

static modules
 –modules-path=/usr/lib/nginx/modules
dynamic module  /etc/nginx/modules  (shortcut to usr/lib/nginx)

Install nginx without unnecessary  modules

Note: every module has some features, and runs in memory (so uninstall unnecessary modules or install with required module)
–without-module
Lets know about some useful nginx modules

Nginx http core module

 

Module ngx_http_core_module

Keepalive

client body, head buffers

etag, if modified since etc

more at here

nginx fastcgi module

fastcgi read timeout to fix 504 timeout nginx

buffers etc.

nginx proxy module

proxy modules and fastcgi directives and variables are same. starts fastcgi_ instead proxy_

proxy module used to backend serer ex use nginx as reverse proxy and load balancer for apache wordpress

all 3 aboe modules necessary to run a nginx server and installed by default with nginx.

 

Memcached & redis modules also available

best modules for nginx third party

WAF security firewall: securing the serer
Pagespeed module for dynamic page optimization
Redis module for object cache
Brotli better than gzip by google
cache purge: ability to purge fastcgi cache
more here

how to enable brotli compression in nginx

$ apt-get install nginx-plus-module-brotli

edit nginx.conf

at top:

load_module modules/ngx_http_brotli_filter_module.so;
load_module modules/ngx_http_brotli_static_module.so;

configurations in  .conf

same as gzip just replacewith brotil.

read more here

____&_____&____&_____&
root@instance-1:~# nginx -V
nginx version: nginx/1.13.8
built by gcc 6.3.0 20170516 (Debian 6.3.0-18)
built with OpenSSL 1.1.0f  25 May 2017
TLS SNI support enabled
configure arguments: –prefix=/etc/nginx –sbin-path=/usr/sbin/nginx –modules-p                                                                                        ath=/usr/lib/nginx/modules –conf-path=/etc/nginx/nginx.conf –error-log-path=/v                                                                                        ar/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 –ht                                                                                        tp-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp –http-uwsgi-temp-path=/var/c                                                                                        ache/nginx/uwsgi_temp –http-scgi-temp-path=/var/cache/nginx/scgi_temp –user=ng                                                                                        inx –group=nginx –with-compat –with-file-aio –with-threads –with-http_addit                                                                                        ion_module –with-http_auth_request_module –with-http_dav_module –with-http_fl                                                                                        v_module –with-http_gunzip_module –with-http_gzip_static_module –with-http_mp                                                                                        4_module –with-http_random_index_module –with-http_realip_module –with-http_s                                                                                        ecure_link_module –with-http_slice_module –with-http_ssl_module –with-http_st                                                                                        ub_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_mod                                                                                        ule –with-stream_ssl_preread_module –with-cc-opt=’-g -O2 -fdebug-prefix-map=/d                                                                                        ata/builder/debuild/nginx-1.13.8/debian/debuild-base/nginx-1.13.8=. -specs=/usr/                                                                                        share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format                                                                                        -security -Wp,-D_FORTIFY_SOURCE=2 -fPIC’ –with-ld-opt=’-specs=/usr/share/dpkg/n                                                                                        o-pie-link.specs -Wl,-z,relro -Wl,-z,now -Wl,–as-needed -pie’
root@instance-1:~#

Nginx modules which are installed by default

 

./configure
–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 \
–user=nginx –group=nginx \
–add-module=/root/incubator-pagespeed-ngx-latest-stable \
–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_sub_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=’-g -O2 \
configure arguments: –prefix=/etc/nginx –sbin-path=/usr/sbin/nginx –modules-p                                                                                        ath=/usr/lib/nginx/modules –conf-path=/etc/nginx/nginx.conf –error-log-path=/v                                                                                        ar/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 –ht                                                                                        tp-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp –http-uwsgi-temp-path=/var/c                                                                                        ache/nginx/uwsgi_temp –http-scgi-temp-path=/var/cache/nginx/scgi_temp –user=ng                                                                                        inx –group=nginx –with-compat –with-file-aio –with-threads –with-http_addit                                                                                        ion_module –with-http_auth_request_module –with-http_dav_module –with-http_fl                                                                                        v_module –with-http_gunzip_module –with-http_gzip_static_module –with-http_mp                                                                                        4_module –with-http_random_index_module –with-http_realip_module –with-http_s                                                                                        ecure_link_module –with-http_slice_module –with-http_ssl_module –with-http_st                                                                                        ub_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_mod                                                                                        ule –with-stream_ssl_preread_module –with-cc-opt=’-g -O2 -fdebug-prefix-map=/d                                                                                        ata/builder/debuild/nginx-1.13.9/debian/debuild-base/nginx-1.13.9=. -specs=/usr/                                                                                        share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format                                                                                        -security -Wp,-D_FORTIFY_SOURCE=2 -fPIC’ –with-ld-opt=’-specs=/usr/share/dpkg/n                                                                                        o-pie-link.specs -Wl,-z,relro -Wl,-z,now -Wl,–as-needed -pie’

How do I see what modules are installed in nginx?

just run this command
sudo nginx -V

What are dynamic modules in nginx?

apache more mature you can add new module just by one click. but with nginx you have to recompile nginx.
to overcome this nginx plus added a new feature called dynamic module. compiled version of file with same linux and nginx server. we can enable disable any time.
i tried pagespeed nginx module. later removed.

nginx server tutorials (installation, configuration, performance tuning, security)

  • Letsencrypt SSL Installation on apache/Nginx ubuntu / debian wordpress
  • fix error 520 522 524 on cloudflare wordpress godaddy nginx etc
  • nginx fastcgi cache wordpress how to configure
  • install LEMP Stack on 22.04 LTS Nginx MySQL PHP fpm #wordpress #digital ocean
  • Apache vs nginx (connection handling, modules, memory usage)
  • Pagespeed module install, configure, monitor, errors ft nginx &apache
  • nginx errors (504,502, 413, unable to start, syntax errors)
  • nginx conf explained best config file performance tuning tips nginx.conf location errors tutorial
  • use nginx as reverse proxy and load balancer for apache wordpress
  • nginx rewrite rules with examples 301 redirection
  • nginx modules list (enable, disable, upgrade, install dynamic module)
  • php fpm pool manager configuration settings based on server spike high cpu wordpress
  • php fpm restart nginx ubuntu enable status page, monitor etc
  • what is TTFB & how to Reduce it (server response time) Google pagespeed
  • letsencrypt install configure on ubuntu / debian nginx
  • Top 10 tips to improve nginx server security
  • nginx performance tuning connections, buffers file descriptors
  • enable brotli compression nginx brotli vs gzip
  • nginx installation on ubuntu 20.04 LTS
  • monitor nginx request with nginx status amplify datadog new relic
  • SSL faster reduce TLS hand shake improve https performance
  • nginx rate limiting explained by location time specific url
  • datadog nginx integration installation process
  • newrelic nginx integration process and errors fix and metrics
  • php fpm seems busy fixed warning and max children reached to handle max connections / requests
  • Php fpm configuration for 1000 concurrent connections server busy max children reached
  • php fpm ondemand vs dynamic vs Static (the dynamic pool problem)
  • nginx upstream response is buffered to a temporary file
  • php fpm install ubuntu 20.04 nginx
  • install phpmyadmin ubuntu nginx 22.04
  • upgrade php fpm ubuntu nginx 7.4 to 8.2
  • nginx add last modified header (remove, php wordpress)
  • php fpm dynamic pool manager settings
  • nginx fastcgi cache purge
  • nginx open file limit connections ulimits sysctl
  • php fpm high cpu usage WordPress 4 solutions nay work for you
  • nginx buffer size for wordpress
  • Cloudflare error code 524 nginx a timeout error occured
  • server configuration for 1000 concurrent users

hi i am raju ginni, primalry i manage wordpress websites on GCP cloud platform as a cloud engineer, and create content on passionate things.
you can follow me on youtbe

© 2025 - All Rights Reserved Disclaimer & Privacy Policy