Install mod_fcgid

To make running PHP scripts more efficient and less memory hungry, we will utilize mod_fcgid. It's a Apache module for FastCGI execution. There is not a precompiled mod_fcgid package for Apache 2.2 in FreeBSD 8.1, thus we will install it from the ports tree.

# cd /usr/ports/www/mod_fcgid
# make install
# make clean

Append following lines to other LoadModule lines in /usr/local/etc/apache22/httpd.conf to enable mod_fcgid:

LoadModule fcgid_module libexec/apache22/
AddHandler fcgid-script .fcgi

Next time Apache starts, it will load fcgid_module. Later we will configure PHP to run under fcgid_module.

FaLang translation system by Faboba