Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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 have been trying to rebuild nginx with cache_purge module from

I did the following and somehow the new build doesn't seem to include the module.

Here is what I did:

Installed nginx

stopped it

installed build tools using:

aptitude -y install build-essential libc6 libpcre3 libpcre3-dev libpcrecpp0 libssl0.9.8 libssl-dev zlib1g zlib1g-dev lsb-base

Then :

cd /usr/src/
sudo wget
sudo wget
tar -xvf nginx-1.5.8.tar.gz
tar -xvf ngx_cache_purge-2.1.tar.gz
cd nginx-1.5.8

Then I did this:

sudo ./configure --add-module=/usr/src/ngx_cache_purge-2.1

The terminal sprouted a lot of things. Then I did:

sudo make && sudo make install

Finally though, when I do nginx -V, I don't see my module in the list. I see only this:

nginx version: nginx/1.4.1 (Ubuntu) TLS SNI support enabled configure arguments: 
--prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf
--http-log-path=/var/log/nginx/access.log --http-proxy-temp-path=/var/lib/nginx/proxy 
--http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi 
--lock-path=/var/lock/nginx.lock --pid-path=/run/ --with-pcre-jit 
--with-debug --with-http_addition_module --with-http_dav_module --with-http_geoip_module 
--with-http_gzip_static_module --with-http_image_filter_module --with-http_realip_module 
--with-http_stub_status_module --with-http_ssl_module --with-http_sub_module 
--with-http_xslt_module --with-ipv6 --with-mail --with-mail_ssl_module 

Can anybody help me understand if I did the build correctly?

share|improve this question

You can use easyengine which install nginx(with cache purge module) php5-fpm mysql and postfix on one go.

Alternatively you can try ppa:rtcamp/nginx which install nginx with cache purge module.

sudo add-apt-repository -y ppa:rtcamp/nginx 
sudo apt-get update
sudo apt-get install nginx-custom
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.