nagios.sourceforge.net/docs/nagios-2.pdf
page 14, says to
Configure Aliases and Directory Options For The Web Interface,
and after typing the script into my etc/httpd/conf/httpd.conf
I Restart The Web Server and obtain the message:
"[warn] The ScriptAlias directive in /etc/httpd/conf/httpd.conf at line 494 will probably never match because it overlaps an earlier Alias."
It is referring to the one scripted in the manual:
ScriptAlias /nagios/cgi-bin /usr/local/nagios/sbin
I have moved this line around the file, and now there are NO other Alias above this one. I have a fresh install of RHEL 4, and I am using the server for NOTHING else.
What am i missing here?
any input is appreciated, thanks.
ok that was my problem, and I found in other places that because i used the RPM there was a nagios.conf that already had this infomation configured… so THEN my next problem was that the web page came up, the i had permission problems with the CGI’s. after banging my head chaning the permissions to ALL access and STILL not getting access to the cgi’s i found this :
[blockquote]on apache 2.0.52 on fedora core 3 a ScriptAlias entry does not allow a script to
be run. It gives a Permission denied: exec of ‘/usr/local/nagios/sbin/test2.cgi’
failed. The conf system cgi-bin is a follows:
ScriptAlias /cgi-bin/ “/var/www/cgi-bin/”
<Directory “/var/www/cgi-bin” >
Options ExecCGI
AllowOverride None
Allow from all
Order allow,deny
My additional entry is as follows:
ScriptAlias "/nagios/cgi-bin/ “/usr/local/nagios/sbin/”
Options ExecCGI
AllowOverride None
Allow from all
Order allow,deny
Directories /usr, /usr/local, /usr/local/nagios, /usr/local/nagios/sbin
have been set to 777 and the file test1.cgi is set to 777
the test1.cgi file work just fine in /cgi-bin/ but when I copy it to
/nagios/cgi-bin/ I get the Permission denied error.
It appears that files in /cgi-bin/ work and others in /nagios/cgi-bin/ will not.
WHY???[/blockquote]
solution:
[blockquote] ------- Additional Comment #2 From Jeff Trawick 2005-02-12 03:45 [reply] -------
If you have set permissions properly on the directories and files, then this has
something to do with Fedora security policy. It isn’t up to Apache to fail the
exec() call with EPERM. That is the OS.
------- Additional Comment #3 From Joe Orton 2005-02-12 11:55 [reply] -------
Specifically the SELinux policy - see
fedora.redhat.com/docs/selinux-apache-fc3/ or ask on
[email protected] - try
chcon -R system_u:object_r:httpd_sys_script_exec_t /usr/local/nagios/sbin
to label the nagios scripts properly; more work will probably be needed though.
[/blockquote]