Add the following to your httpd.conf file:
# Added for NAGIOS
ScriptAlias /nagios/cgi-bin/ /usr/local/nagios/sbin/
AllowOverride AuthConfig
Options ExecCGI
Order allow,deny
Allow from all
Alias /nagios/ /usr/local/nagios/share/
AllowOverride AuthConfig
order allow,deny
allow from all
# End of NAGIOS
In addition you may have to edit your access.conf file, and we recommend you add a strict .htaccess file. Here is our
/usr/local/nagios/sbin/.htaccess file:
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
require valid-user
The htpasswd file is created with the htpasswd utility as usual.