Basic with PHP

A sample Apache configuration that enables PHP

The following is a sample httpd.conf configuration file. I’ve bolded the sections you should pay attention to.
# Load basic Apache configuration
Include basic.conf
# Load Modules
Include modules.conf
# Load the PHP module
LoadModule php4_module /usr/lib/apache/1.3/libphp4.so
AddModule mod_php4.c
AddType application/x-httpd-php .php
# Load Logs
Include logfiles.conf
ServerAdmin [email protected]
ServerName www.widgetware.com
DocumentRoot /var/www/
ErrorLog /var/log/apache/error.log
CustomLog /var/log/apache/ access.log combined
<Directory />
Options Indexes SymLinksIfOwnerMatch MultiViews
   AllowOverride None
</Directory>
<Directory /var/www/>
        DirectoryIndex index.php
    Options Indexes Includes FollowSymLinks MultiViews ExecCGI
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

It’s Tuesday morning. Your boss Jane rushes into your office and tells you that she needs a new web server set up today for a new client.

The client’s domain is www.widgetware.com, a PHP-based groupware application. There’s nothing special about this domain setup, aside from the fact that they need PHP installed and running alongside it.

You already have a Linux box available for the server, so you install Apache 1.3 and PHP4.