1/2/2009 8:17:27 AM
Apache 2.2.x

1. Download this file to a temp directory:

Please use the mirrors


2. From the directory you saved httpd-2.2.4.tar.gz, I will use: /usr/home/rapidfx/src/
cd /usr/home/rapidfx/src
tar xvfz httpd-2.2.4.tar.gz

3. The tar command will create a directory named: httpd-2.2.4 in the current directory.
cd httpd-2.2.4

4. Next, configure Apache install.
./configure --prefix=/usr/local/apache2 --enable-mods-shared=most
./configure --prefix=/usr/local/apache2 --enable-mods-shared=all

"--prefix" tells Apache the path to install to.
This will install Apache to /usr/local/apache2 and enable "most" or "all" modules.

  • How To Control Apache Install Path

  • Here are the differences between "most" and "all" apache_most_all.txt

  • Type "./configure --help" for syntax.
    After Apache is installed, edit httpd.conf and comment
    out the LoadModule
    lines for the modules that you do not wish to use at this time. They
    will not be loaded by Apache, but the modules will be installed and easily
    enabled at a later date without having to recompile.
    NOTE: Apache 2.2.x Performance Notes

    5. Install Apache with these commands.
    make depend
    make install

    Apache is now installed.
    Next, configure Apache.
    httpd.conf is the Apache configuration file.
    Apache only reads this file during startup, therefore
    Apache must be restarted when changes are made to httpd.conf

    1. Edit httpd.conf (/usr/local/apache2/conf/httpd.conf)
    2. Search for ServerName directive.
    Add your IP ( to ServerName
    (The IP of the computer running Apache)

    ServerName valid-domain.com:80

    Save and exit.

    Next, place HTML documents to be viewed from browsers.
    HTML documents will go here:

    Next, start apache.
    cd /usr/local/apache/bin
    ./apachectl start
    ./apachectl stop (Stops The Server)
    NOTE: apachectl - Apache HTTP Server Control Interface

    Apache should now be running.
    Read error_log if Apache fails to start.
    You should be able to load your browser and view your site.
    Below is an httpd.conf example.

    OpenBSD users should read this: chroot() Apache