I want to install this module.

The problem is it requires that nginx is installed from source. I have it installed via apt-get install, and it is already serving web pages.

So which steps would you follow to change from one to the other? If possible I would like them to use the same paths. In the example it uses /opt, but apt-get installed it in a different place (I see entries in /etc, /lib, /usr/bin, /usr/share).


The basic procedure is to remove the installed version, and then install the new one:

    sudo apt-get purge nginx

Now, download the source tar ball of what you want to install and extract it:

    wget http://nginx.org/download/nginx-1.3.11.tar.gz
    tar xvvzf nginx-1.3.11.tar.gz 

The files you see in /etc and /lib are settings and service scripts and the like. They will be there no matter where you install nginx, apt installs nginx to /usr.

So, tell the included configure script to install in /usr:

cd nginx-1.3.11/
./configure --prefix=/usr

Then compile and install:

sudo make install

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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