Setting Up An IMAP-Based Email Solution, part 2 - Page 2
You'll need PHP to implement SquirrelMail. PHP is a scripting language that can be built as a module for Apache. It is downloadable from www.php.net.
bash-2.03$ tar -xzf php-4.0.4pl1.tar.gz bash-2.03$ cd php-4.0.4pl1 bash-2.03$ ./configure --with-apxs=/usr/local/apache/bin/apxs bash-2.03$ make bash-2.03$ sudo make install
If you want international language support add --with-gettext to the configure line.Make sure the following lines are in /etc/httpd/conf/httpd.conf:
LoadModule php4_module modules/libphp4.so AddModule mod_php4.c AddType application/x-httpd-php .php3 .phtml .php AddType application/x-httpd-php-source .phps
They may be scattered about, but they should be there. I found that the PHP entries ended up wrapped inside of the <IfDefined SSL> stanza. To use PHP without SSL, you'll want them outside of that entry. Cut and paste to move beyond </IfDefined>:
<IfDefine SSL> LoadModule ssl_module libexec/libssl.so </IfDefine> LoadModule php4_module libexec/libphp4.so <IfDefine SSL> AddModule mod_ssl.c </IfDefine> AddModule mod_php4.c
You will also need to change the port Apache uses. By default it is installed set to 8080, so the server does not need to be run as root initially. Normal http access is at port 80, and https access is at port 443. If you choose to use the higher numbered ports, you'll have to inform your users to connect to them instead.
You'll also probably want to add index.php to the DirectoryIndex entry:
DirectoryIndex index.html index.php
You should see something like this in /var/log/http/error.log:
[Sun Apr 22 22:20:47 2001] [notice] Apache/1.3.19 (Unix) PHP/4.0.4pl1 configured -- resuming normal operations