RapidFX

APACHE SETUP

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


1. Download this file to a temp directory:

Please use the mirrors

http://www.apache.org/dist/httpd/httpd-2.2.4.tar.gz
http://www.apache.org/dist/httpd/

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
or
./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
    make depend
    make install



    Apache is now installed.
    Next, configure Apache.
    httpd.conf is the Apache configuration file.
    "/usr/local/apache2/conf/httpd.conf"
    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 (123.123.123.123) to ServerName
    (The IP of the computer running Apache)

    ServerName 140.183.234.10
    or
    ServerName 140.183.234.10:80
    or
    ServerName valid-domain.com:80

    Save and exit.



    Next, place HTML documents to be viewed from browsers.
    HTML documents will go here:
    /usr/local/apache2/htdocs/



    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.
    "/usr/local/apache2/logs/error_log"
    You should be able to load your browser and view your site.
    Below is an httpd.conf example.
    httpd.conf

    OpenBSD users should read this: chroot() Apache