How to install Apache2 and PHP 5 in Freebsd 7.0
Getting Apache installed in FreeBSD 7.0
1. cd /usr/ports/www/apache22
2. make install clean
Note: During the make install you will need to select which modules you would like enabled.
Getting PHP5 installed in FreeBSD 7.0
1. cd /usr/ports/lang/php5
2. make install clean
3. cd /usr/ports/lang/php5-extensions
4. make config
5. make install clean
Putting it all together
1. vi cd /usr/local/etc/apache2/httpd.conf
2. at the end of the LoadModule directive add these lines
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
3. copy /usr/local/etc/php.ini-recommended or /usr/local/etc/php.ini-dist to /usr/local/etc/php.ini
4. start apache with the following command:
/usr/local/sbin/apachectl start
