I have been moving my nagios on apaches virtualhost and adding the following configuration file
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName nagios.example.com
ServerAlias nagios.example.com
DocumentRoot /usr/local/nagios/share
ScriptAlias /cgi-bin/nagios /usr/local/nagios/sbin
ScriptAlias /nagios/cgi-bin /usr/local/nagios/sbin
# Where the stylesheets (config files) reside
#Alias /nagios/stylesheets /usr/local/nagios/share
# Where the HTML pages live
Alias /nagios /usr/local/nagios/share
<Directory /usr/local/nagios/share>
Options FollowSymLinks
DirectoryIndex index.php
AllowOverride AuthConfig
Order Allow,Deny
Allow From All
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /etc/nagios3/htpasswd.users
require valid-user
</Directory>
</VirtualHost>
When I browse the page I'm getting the following error:
The requested URL /cgi-bin/tac.cgi
was not found on this server.
Checking the scriptaliases
routes everything seems to be alright. Clicking inside of a menu the cgi problem do not persist, just on page browsing.
Best Answer
Your Configuration file looks alright just comment the line
Because you are already defining the DocumentRoot thus this line is making conflict with in your path defining for Nagios.