Section 1. Apache Web Server Installation on Windows OS

2.0.52 version of the Apache HTTP Server download. (documentation Apache on Windows)
The default directory to install Apache into is C:\Program Files\Apache Group\Apache

Two ways to run Apache
1. As a service (install by default)
From the console window (Start Menu ... start / stop), Closing this console window will terminate the Apache server. (2nd installation option)


Testing Apache for Windows

cd "\program files\apache group\apache"
Wait for Apache to exit, or press Ctrl+C
more <logs\error.log

Testing Apache
Launch a browser, point to http://localhost/, you should see the apache welcome page.
For those running other web servers (PWS or IIS), stop their services first.
If nothing happens or you get an error, look in the error.log file in the logs directory. If your host isn't connected to the net, you may have to use this URL:

Default web documents directory: C:\Program Files\Apache Group\Apache\htdocs

Because Apache CANNOT share the same port with another TCP/IP application, you may need to stop or uninstall certain services first. These include (but are not limited to) other web servers, and firewall products such as BlackIce. If you can only start Apache with these services disabled, reconfigure either Apache or the other product so that they do not listen on the same TCP/IP ports. You may find the Windows "netstat -an" command useful in finding out what ports are in use.

Configuring Apache
Begin configuring the Apache server by reviewing httpd.conf and its directives.
C:\Program Files\Apache Group\Apache\conf\httpd.conf

Mapping URLs to Filesystem Locations

In deciding what file to serve for a given request, Apache's default behavior is to take the URL-Path for the request (the part of the URL following the hostname and port) and add it to the end of the DocumentRoot specified in your configuration files.

Apache is also capable of Virtual Hosting, where the server receives requests for more than one host.

Files Outside the DocumentRoot
There are frequently circumstances where it is necessary to allow web access to parts of the filesystem that are not strictly underneath the DocumentRoot. Apache offers several different ways to accomplish this. On Unix systems, symbolic links can bring other parts of the filesystem under the DocumentRoot.

Alternatively, the Alias directive will map any part of the filesystem into the web space. For example, with

Alias /docs /var/web
the URL will be served from /var/web/dir/file.html. The ScriptAlias directive works the same way, with the additional effect that all content located at the target path is treated as CGI scripts.

For situations where you require additional flexibility, you can use the AliasMatch and ScriptAliasMatch directives to do powerful regular-expression based matching and substitution. For example,

ScriptAliasMatch ^/~([^/]*)/cgi-bin/(.*) /home/$1/cgi-bin/$2
will map a request to to the path /home/user/cgi-bin/script.cgi and will treat the resulting file as a CGI script.

Example.. To create a alias (or virtual directory)
Add the following lines in the appropriate position in httpd.conf
To set options

Alias /php_richard d:/mywork/php_richard

<Directory "d:/mywork/php_richard">
Options +Includes