
Navigate to /usr/ports/www/apache22 and run make install clean
We probably want Apache to start after a reboot, hence we drop a line to rc.conf.
echo 'apache22_enable="YES"' >> /etc/rc.conf
The file httpd.conf probably needs to be modified slightly.
You find it at /usr/local/etc/apache22/
Modify the following according to your environment:
Listen 123.123.123.123:80
ServerName 123.123.123.123:80
Now you should be able to start Apache with the command /usr/local/sbin/apachectl start.
Or you can run rehash and then apachectl start.
Check out man apachectl for more options and how to use it.
At this point you might get the following error:
[Thu Jan 01 00:00:00 2009] [warn] (2)No such file or directory: Failed to enable the 'httpready' Accept Filter
To fix this we do the following:
kldload accf_http
And to load it at boot:
echo 'accf_http_load="YES"' >> /boot/loader.conf