Thursday, October 9, 2008

How to setup HTTPD and PHP

HTTPD
./configure \
--prefix=/(install dir)/apache \
--exec-prefix=/(install dir)/apache \
--enable-mods-shared=all \
--enable-so --enable-ssl --enable-z

PHP
./configure --prefix=/usr --with-apxs2=/(apache install dir)/bin/apxs --with-pgsql=/(postgres install dir)/postgres --enable-mbstring --with-gd &&
make
make install
#cp php.ini-dist /usr/lib/php.ini
cp php.ini-recommended /usr/lib/php.ini

edit httpd.conf
LoadModule php5_module libexec/libphp5.so
AddType application/x-httpd-php .php .phtml