===== 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 HTTP_GZIP_STATIC=NO And change it to: HTTP_GZIP_STATIC=YES ===== 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.
This will download all dependencies needed to build the package.
apt-get build-dep nginx
Here we will download the sources from Debian repo (Enable src in your sources.list).
cd /tmp/
apt-get source nginx
Edit the file nginx-0.6.32/auto/options (The version of nginx for you may be different). Look for this line
HTTP_GZIP_STATIC=NO
And change it to:
HTTP_GZIP_STATIC=YES
Enter in the nginx directory.
dpkg-buildpackage -uc -b
sudo dpkg -i ../nginx_0.6.32-3+lenny3_i386.deb
Your version may be different.