Tuesday, July 25, 2006

Apache 2.2 PHP5 Build

OpenSSL
shell> ./config shared
shell> make
shell> make test
shell> make install

Apache2
shell> ./configure --prefix=/usr/local/apache --enable-so
shell> make
shell> make install

PHP5
shell> ./configure --with-apxs2=/usr/local/apache/bin/apxs
shell> make
shell> make install
shell> cp php.ini-dist /usr/local/lib/php.ini

Open:

/usr/local/apache/conf/httpd.conf

After (or somewhere in httpd.conf):

AddType application/x-gzip .gz .tgz

Add:

AddType application/x-httpd-php .php
AddType application/x-httpd-source .phps

Change:

DirectoryIndex index.html index.htm

To:

DirectoryIndex index.php index.html index.htm

Start Apache with:

shell> /usr/local/apache/bin/apachectl start

No comments: