Edit 20150129: Non-standard config in use. This issue does not pertain directly to an "out of the box" configuration, though it might aid others indirectly who land here as the result of a search hit on this error. The process status is implemented as a client side jQuery call to the server CGI, so it's rendered client side, not server side. The jQuery call is relative to the page URL, so the cgi-bin folder is expected to exist wherever the page was served from. As explained below, it's quite possible to violate that expectation.
All right, I've found the reason for this behavior. I guess Nagios expects to own the URL space. I'm actually running some other web apps so Nagios is in a vhost. It has a /etc/httpd/conf.d/nagios.conf of:
Code: Select all
<VirtualHost *:80>
DocumentRoot /usr/local/nagios/share
ServerName server.name
.
.
.
ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"
.
.
.
Alias /nagios "/usr/local/nagios/share"
.
.
.
</VirtualHost>
As a result you can access Nagios both with
http://server.name and
http://server.name/nagios . The former fails because the cgi-bin resources are under /nagios/cgi-bin and the relative reference, when using
http://server.name as the base, tries to hit
http://server.name/cgi-bin which does not exist. If you hard code the reference it works, but this is problematic because cgi-bin is intended to be relative to the movable document root.
It can actually be resolved with an additional ScriptAlias to go with the vhost DocumentRoot, like so:
Code: Select all
<VirtualHost *:80>
DocumentRoot /usr/local/nagios/share
ServerName server.name
.
.
.
ScriptAlias /cgi-bin "/usr/local/nagios/sbin"
ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"
.
.
.
Alias /nagios "/usr/local/nagios/share"
.
.
.
</VirtualHost>