Apache 2.0 and PHP 4.0 Compilation HOWTO

1. gzip -d httpd-2_0_NN.tar.gz
2. tar xvf httpd-2_0_NN.tar
3. gunzip php-NN.tar.gz
4. tar -xvf php-NN.tar
5. cd httpd-2_0_NN
6. ./configure --enable-so
7. make
8. make install

Now you have Apache 2.0.NN available under /usr/local/apache2,
configured with loadable module support and the standard MPM prefork.
To test the installation use your normal procedure for starting
the Apache server, e.g.:
/usr/local/apache2/bin/apachectl start
and stop the server to go on with the configuration for PHP:
/usr/local/apache2/bin/apachectl stop.

9. cd ../php4-NN
10. ./configure --with-apxs2=/usr/local/apache2/bin/apxs
11. make
12. make install
13. cp php.ini-dist /usr/local/lib/php.ini
14. vi /etc/init.d/httpd (change location of binares to /usr/local/apache2/bin/[filename]
15. vi /usr/local/apache2/conf/httpd.conf (edit location of php module to /usr/local/apache2/modules/[modfilename]
16. Restart Apache.

Partly taken from PHP.net and some additional notes by me.