## Apache Setup

Instructions | API Docs | Apache Setup | PHP Setup | Unit Tests

The current version of Apache as this is written is 2.0.55.

### Installation

You can get the current distribution from the download section of the Apache site.

This document will assume `C:\Apache Group\Apache2` as your Apache base directory. It will assume `C:\dev\php5` as your PHP base directory.

### Configure

Apache's configuration is captured in the `C:\Apache Group\Apache2\conf\httpd.conf` file.

Turning on PHP 5 Support

Edit the configuration file and add the following entries in the appropriate sections:

    # Dynamic Shared Object (DSO) Support
      LoadModule php5_module "c:/dev/php5/php5apache2.dll"

      # AddType
      AddType application/x-httpd-php .php

      # Anywhere
      PHPIniDir "c:/dev/php5"

Document Root

Search for "DocumentRoot" to locate the directory for your document root. If you decide to change this, please also change the value of <Directory to match the document root.

Restart Apache server to have the changes take effect.

### Tips / Troubleshooting

To test whether PHP is properly configured for you web server, create a file, call it phpinfo.php and paste the following in:

`<?php phpinfo(); ?>`

Copy the file to your document root and access it in your browser by navigating to `http://localhost:[port]/phpinfo.php` where port is your http port. You should be presented with a page of PHP information about the current stage of PHP.