Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

deb lucid nginx
deb-src 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/ )

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.

share|improve this question
up vote 1 down vote accepted

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.