2

I'm on Ubuntu 12.04.1 with unattended-upgrades configured for automatic security updates, and I installed Nginx by first adding

deb http://nginx.org/packages/ubuntu/ lucid nginx
deb-src http://nginx.org/packages/ubuntu/ lucid nginx

to /etc/apt/sources.list file, just as was suggested by the official wiki, and then by

sudo apt-get update
sudo apt-get install nginx

which installed Nginx with all the standard modules. But now I think I could make good use of one or two of the Nginx optional modules, like the gzip precompression module or some security-related one. So far, I see two ways of adding an optional module to Nginx, one is compiling and installing from the source code and the other is described in this article.

So, which of the ways should I choose so that automatic updates still run for and apply to Nginx and its optional modules? Or should I create a cron job with a command/script specific for Nginx instead of using unattended-upgrades utility? Can I choose between volume updates and security-only updates to be automatically applied to the standard and optional modules? And finally, is there a possibility to automatically update Nginx's modules on the fly (without any connections having been dropped), like the documentation suggests it's possible with

sudo kill -USR2 $( cat /run/nginx.pid )

P.S. Actually I'm not certain if unattended-upgrades utility would automatically update the standard modules in the first place, not enough time has passed since Nginx was installed to say for sure.

1 Answer 1

2

All modules in nginx are compiled into the core binary, so any update to nginx will update the modules as well.

I'm not real familiar with apt-get, but I believe the article you are linking to is basically just modifying the package to tell it to use the additional modules. Any update from the repository will revert it back to the stock modules.

If you need specific modules for nginx you are probably best off compiling it yourself. It is relatively straightforward, simply pass the appropriate option to the configure command to include a specific module (ie. --with-http_gzip_static_module for the gzip static module). It is definitely possible to script this, although I'm not sure how you would determine automatically what the current version is.

Building Nginx From Source

Nginx modules

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .