Nginx How to add modules

Hello I follow this guide:

https://www.linode.com/docs/websites/ng … r-debian-8">https://www.linode.com/docs/websites/nginx/nginx-web-server-debian-8

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

Nginx modules are added at build time. To include those modules you'll need to add them to the ./configure line and and redo the 'make' and 'make install'. In the source directory, you'd do something like:

make clean

./configure (… list of desired options and modules)

make

make install

You'll find a complete list of modules here: http://wiki.nginx.org/Modules

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.

I end up rebuilding and installing it using the repositories its a legacy version but I'm ok with it. thanks for your advice sleddog :)

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct