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/mod_fcgid.so
<IfModule>
AddHandler fcgid-script .fcgi
</IfModule>

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

FaLang translation system by Faboba