Nginx How to add modules
And Install Nginx from a Source Distribution my problem is when I check my nginx version using sudo /opt/nginx/sbin/nginx -V
nginx version: nginx/1.9.3
built by gcc 4.9.2 (Debian 4.9.2-10)
built with OpenSSL 1.0.1k 8 Jan 2015
TLS SNI support enabled
configure arguments: --prefix=/opt/nginx --user=nginx --group=nginx --with-httpsslmodule --with-ipv6
it turns out I don't have the modules I need like ngxhttpstubstatusmodule and ngxhttprealip_module??
I'm new to linux and nginx can you give me tips on how to do it?
I've done some research it turns out that I might need to reinstall the whole thing but don't want to do it as much as possible.
2 Replies
make clean
./configure (… list of desired options and modules)
make
make install
You'll find a complete list of modules here:
Alternately you can install nginx from the Debian repositories. To do this you should first remove all traces of the source build install. The Debian repository will install nginx 1.6.
Advantage of installing the Debian version is ease of updates (apt-get update && apt-get upgrade will take care of it). Disadvantage is the absence of new features found in more recent nginx versiosn. This is a disadvantange only if you need those new features.
If you use the source installation, you'll need to watch for new updates and manually re-install when a new version is released --this is particularly important when an update contains security fixes.