User Tools

Site Tools


1. Prepare the system

This will download all dependencies needed to build the package.

    apt-get build-dep nginx

2. Download sources

Here we will download the sources from Debian repo (Enable src in your sources.list).

    cd /tmp/
    apt-get source nginx

3. Enable the gzip_static option

Edit the file nginx-0.6.32/auto/options (The version of nginx for you may be different). Look for this line


And change it to:


4. Compiling Nginx

Enter in the nginx directory.

    dpkg-buildpackage -uc -b

5. Install Nginx on Debian or Ubuntu

    sudo dpkg -i ../nginx_0.6.32-3+lenny3_i386.deb

Your version may be different.

huy/debian_custom_nginx.txt · Last modified: 2011/01/31 12:02 by slayer