Skip Navigation


If you have an account on this web site you may login.

If you have an account on this site but have forgotten your user name and / or your password then you can request an account reminder email.

Compiling Apache

Following is how to install apache and mod_perl with mod_gzip by compiling them from source, this is generall needed for MKDoc (Apache 2.x which comes with many GNU/Linux distros is not suitable) , see the mod_perl site for more details.

Download the source code

The latest apache apache 1.3.x can be downloaded from here:

The latest mod_perl from here:

And mod_gzip from here:


Check the sigs

gpg --recv-key 08C975E5
gpg --verify apache_1.3.33.tar.gz.asc
gpg --recv-key 88C3A5A5
gpg --verify mod_perl-1.29.tar.gz.asc

Uncompress and extract

tar -zxvf apache_1.3.33.tar.gz
tar -zxvf mod_perl-1.29.tar.gz
tar -zxvf mod_gzip-

Copy mod_gzip source into the apache source tree and edit the Makefile.tmpl:

mkdir apache_1.3.33/src/modules/gzip
cp mod_gzip-*.c apache_1.3.33/src/modules/gzip/
cp mod_gzip-*.h apache_1.3.33/src/modules/gzip/
cp mod_gzip- apache_1.3.33/src/modules/gzip/
vi apache_1.3.33/src/modules/gzip/Makefile.tmpl

Make and install

Make and install mod_perl with mod_gzip and apache:

cd mod_perl-1.29
perl Makefile.PL APACHE_SRC=../apache_1.3.33/src \
make test
make install
cd ../apache_1.3.33
make install

Configure mod_gzip

Add this to /usr/local/apache/conf/httpd.conf:

# mod_gzip
<IfModule mod_gzip.c>
  mod_gzip_on Yes
  mod_gzip_item_include handler ^perl-script$
  mod_gzip_item_include mime text/html
  mod_gzip_item_include mime text/plain
  mod_gzip_item_include mime text/css
  mod_gzip_item_include mime application/xml
  mod_gzip_dechunk yes
  mod_gzip_min_http 1000
  mod_gzip_temp_dir /tmp
  mod_gzip_keep_workfiles No
  mod_gzip_minimum_file_size  1000
  mod_gzip_maximum_file_size  0
  mod_gzip_maximum_inmem_size 1000000
  mod_gzip_can_negotiate Yes

Start Apache

Apache can now be started:

/usr/local/apache/bin/apachectl start

And if you want it to start after a reboot you can add this to /etc/rc.local (sourcing the script is essential for MKDoc to work properly and you chould change the path to whereever you have MKDoc installed):

source /var/mkdoc/
/usr/local/apache/bin/apachectl start


This document was last modified by Chris Croome on 2005-04-05 03:48:05
MKDoc Ltd., 31 Psalter Lane, Sheffield, S11 8YL, UK.
Copyright © 2001-2005 MKDoc Ltd.