Compile Apache on Fedora

Below is a walk-through for compiling Apache 2.2 on Fedora 9. First, download and unpack the source tarball from Apache.org. As of August 2008, the latest version of Apache is 2.2.9 (httpd-2.2.9.tar.gz)

tar -xzvf httpd-2.2.9.tar.gz
cd httpd-2.2.9

Next, configure the source for build. You can provide configure with –help to see the large list of options. The example below enables mod_rewrite, mod_cache, mod_mem_cache and mod_ssl as shared modules in /opt/apache2/modules. Change –prefix to adjust your install PREFIX and adjust the configure options to suit your needs.

./configure --prefix=/opt/apache2 --enable-rewrite=shared --enable-cache=shared --enable-mem-cache=shared --enable-module=so

Now, build and install Apache.

make
sudo make install

Your Apache configuration will be in /opt/apache2/conf and you can control Apache with /opt/apache2/bin/apachectl. Refer to the Apache documentation for more details.