mariusv.com

Watch as I awkwardly stumble through life

Install Apache and PHP 5 on FreeBSD

Posted by Marius Voila on June 07, 2010 in London, U.K . — 0 comments This post contains 92 words

Install Apache with PHP5 support on FreeBSD is easy when you use the port system. First you must install PHP 5 with mod_php support for Apache:

# cd /usr/ports/lang/php5
# make config

Inside the dialog box you must to select this option:

APACHE Build Apache module

To install Apache:

# cd /usr/ports/www/apache22
# make; make install; make clean

The /usr/local/etc/apache22/httpd.conf must contains these lines:

# PHP configuration
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
LoadModule php5_module libexec/apache22/libphp5.so