FreeBSD Apache

Install

First, add your hostname to /etc/hosts so Apache doesn't have issues with local name resolution.

Build and install Apache using ports.

cd /usr/ports/www/apache22-worker-mpm
make -DWITHOUT_DAV -DWITHOUT_DAV_FS -DWITHOUT_CGI -DWITH_SUEXEC make install
cd /usr/ports/www/mod_fcgid && make install
Add user for suexec
pw useradd -n vhost -s /usr/sbin/nologin -d /nonexistent
Modify Apache configuration

Load fcgid module

fetch -q -o /usr/local/etc/apache22/extra/httpd-fcgid.conf http://beandog.org/apache/httpd-fcgid.conf
echo Include etc/apache22/extra/httpd-fcgid.conf  >> /usr/local/etc/apache22/httpd.conf
LoadModule fcgid_module libexec/apache22/mod_fcgid.so
<IfModule mod_fcgid.c>
  AddHandler fcgid-script .fcgi
</IfModule>
Setup Apache to start on boot

Load the accf_http module:

kldload accf_http

Add to /etc/rc.conf:

accf_http_load="YES"
apache22_enable="YES"