- To install the Apache-SSL web server with PHP support download the following files.
http://www.php.net/distributions/php-4.1.2.tar.gz
http://httpd.apache.org/dist/httpd/old/apache_1.3.23.tar.gz
http://www.modssl.org/source/mod_ssl-2.8.7-1.3.23.tar.gz
http://www.openssl.org/source/openssl-0.9.6c.tar.gz
- Unpack the applications:
Tar zxvf postgresql-7.2.1.tar.gz
Tar zxvf php-4.1.2.tar.gz
Tar zxvf apache_1.3.23.tar.gz
Tar zxvf mod_ssl-2.8.7-1.3.23.tar.gz
Tar zxvf openssl-0.9.6c.tar.gz
- Install PostgreSQL:
cd /usr/local/src/postgresql-7.2.1
./configure
make
make install
- Install OpenSSL:
cd /usr/local/src/openssl-0.9.6
./config -prefix=/usr/local/openssl
make
make test
make install
- Patch Apache with mod_ssl:
cd /usr/local/src/mod_ssl-2.8.7-1.3.23
./configure -with-apache=../apache_1.3.23
- Build and install Apache with SSL, DSO and postgreSQL support:
cd /usr/local/src/apache_1.3.23
SSL_BASE=../openssl-0.9.6c
./configure -prefix=/usr/local/apache --enable-module=ssl \
--enable-module=so
make
make certificate
make install
- Build PHP:
cd /usr/local/src/php-4.1.2
CFLAGS='-O2 -I/usr/local/src/openssl-0.9.6c'
./configure -with-apxs=/usr/local/apache/bin/apxs \
-with-pgsql=/usr/local/pgsql --enble-track-vars \
--with-xml
make
make install
- Edit the Apache configuration file:
vi /usr/local/apache/conf/httpd.conf
and add the following lines:
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .php
also add index.php to the list of valid directory files.
<IfModule mod_dir.c>
DirectoryIndex index.php index.htm index.html
</IfModule>