- Download the Apache and PHP4 tar.gz source packages from httpd.apache.org and www.php.net
respectively.
- Install apache:
cp apache*.tar.gz /usr/local/
cd /usr/local/
gzip -dc apache*.tar.gz | tar xvf -
cd apache*/
./configure --enable-module=so
make
make install
- Install PHP4:
cp php*.tar.gz /usr/local/
cd /usr/local/
gzip -dc php*.tar.gz | tar xvf -
cd php*/
./configure --with-apxs=/usr/local/apache/bin/apxs
make
make install
- Modify your /usr/local/apache/conf/httpd.conf file to contain:
LoadModule php4_module libexec/libphp4.so
Addtype application/x-httpd-php .php
Addtype application/x-httpd-php .html
Addtype application/x-httpd-php-source .phps
done!