Note: If you installed Nagios by a package manager, or it is preinstalled by your distro you may not have to do this step.
Add the following to httpd.conf (your path might be different depending on the OS and version of Apache, remember to use locate if you get stuck):
# ee /usr/local/etc/apache2/httpd.conf
Then copy and paste the text below:
ScriptAlias /nagios/cgi-bin /usr/local/share/nagios/cgi-bin <Directory "/usr/local/share/nagios/cgi-bin"> AllowOverride AuthConfig Options ExecCGI Order allow,deny Allow from all </Directory> Alias /nagios /usr/local/share/nagios <Directory "/usr/local/share/nagios"> Options None AllowOverride AuthConfig Order allow,deny Allow from all </Directory>
Please note the paths for FreeBSD are slightly different from the Nagios docs (it's a Linux/BSD thing).
# /usr/local/sbin/apachectl restart
You should now be able to visit the IP/nagios (eg. http://192.168.0.10/nagios) of your server and you should see the Nagios navigation. You will (and should) note that Nagios isn't actually running yet. We still have to configure Nagios.
One the plus side, you should now be able to access the Nagios documentation locally on your Nagios server.