Hi again,<br><br><div class="gmail_quote">On Thu, Jun 25, 2009 at 3:39 PM, Kaplan, Andrew H. <span dir="ltr"><<a href="mailto:AHKAPLAN@partners.org">AHKAPLAN@partners.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">




<div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Hi there --</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">I can answer your questions in the order they were 
asked:</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">1. I made sure to restart apache after the changes were 
made via the "sudo /etc/init.d/httpd restart" command 
syntax.</font></span></div></div></blockquote><div><br>OK, great. Just making sure :-)<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">2. The output of the apachectl configtest is the 
following:</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">            [Thu 
Jun 25 10:22:48 2009] [warn] The ScriptAlias directive in 
/etc/httpd/conf/httpd.conf at line 566 will probably never match because it 
overlaps an earlier 
Alias.<br>            
[Thu Jun 25 10:22:48 2009] [warn] The Alias directive in 
/etc/httpd/conf/httpd.conf at line 583 will probably never match because it 
overlaps an earlier 
Alias.<br>            
Syntax OK</font></span></div></div></blockquote><div><br>Right. This indicates that the configuration options for the 'ScriptAlias /nagios/cgi-bin /usr/local/nagios/sbin' and 'Alias /nagios /usr/local/nagios/share' on lines 566 and 583 of your httpd.conf file aren't taking effect. This is probably because there is a file in /etc/httpd/conf.d (possibly 'nagios.conf'?) that is being loaded before apache parses those lines in your httpd.conf file (see line 210 of your httpd.conf file: 'include conf.d/*.conf'). Have a look at the file in /etc/httpd/conf.d and see what ScriptAlias and Alias definitions exist in that file. It might in fact make more sense to put the nagios web configuration in that file rather than in the httpd.conf file... though it's up to you. There should only be one definition for the nagios Alias and ScriptAlias definitions, and they should be as they currently are in your httpd.conf file.<br>
 </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span></div>

<div><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div><span><font color="#0000ff" face="Arial" size="2">3. The 
files that are located in the /usr/local/nagios/sbin directory are the 
following:</font></span></div>
<div dir="ltr" align="left"><font face="Arial"><font color="#0000ff"><font size="2"><span>            
-rwxrwxr-x 1 nagios nagios 229964 Jun 24 15:48 
avail.cgi<br>            
-rwxrwxr-x 1 nagios nagios 225272 Jun 24 15:48 
cmd.cgi<br>            
-rwxrwxr-x 1 nagios nagios 193036 Jun 24 15:48 
config.cgi<br>            
-rwxrwxr-x 1 nagios nagios 246284 Jun 24 15:48 
extinfo.cgi<br>            
-rwxrwxr-x 1 nagios nagios 197292 Jun 24 15:48 
histogram.cgi<br>            
-rwxrwxr-x 1 nagios nagios 176684 Jun 24 15:48 
history.cgi<br>            
-rwxrwxr-x 1 nagios nagios 172812 Jun 24 15:48 
notifications.cgi<br>            
-rwxrwxr-x 1 nagios nagios 168460 Jun 24 15:48 
outages.cgi<br>            
-rwxrwxr-x 1 nagios nagios 172844 Jun 24 15:48 
showlog.cgi<br>            
-rwxrwxr-x 1 nagios nagios 234156 Jun 24 15:48 
status.cgi<br>            
-rwxrwxr-x 1 nagios nagios 190220 Jun 24 15:48 
statusmap.cgi<br>            
-rwxrwxr-x 1 nagios nagios 188940 Jun 24 15:48 
statuswml.cgi<br>            
-rwxrwxr-x 1 nagios nagios 172588 Jun 24 15:48 
statuswrl.cgi<br>            
-rwxrwxr-x 1 nagios nagios 193100 Jun 24 15:48 
summary.cgi<br>            
-rwxrwxr-x 1 nagios nagios 184940 Jun 24 15:48 
tac.cgi<br>            
-rwxrwxr-x 1 nagios nagios 201388 Jun 24 15:48 
trends.cgi</span></font></font></font></div></div></blockquote><div><br>That all looks good, because these files are executable by everybody, so the apache user will be able to execute them.<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div dir="ltr" align="left"><font face="Arial"><font color="#0000ff"><font size="2"><span></span></font></font></font></div>
<div><font face="Arial"><font color="#0000ff"><font size="2"><span></span></font></font></font> </div>
<div><font face="Arial"><font color="#0000ff"><font size="2"><span>4. The permissions of the files would seem to indicate 
the apache user has read and execute permissions. If necessary, I can change the 
permissions</span></font></font></font></div>
<div><font face="Arial"><font color="#0000ff"><font size="2"><span>    to match those of the owner and 
group.</span></font></font></font></div></div></blockquote><div><br>No, it looks fine.<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div><font face="Arial"><font color="#0000ff"><font size="2"><span></span></font></font></font></div>
<div><font face="Arial"><font color="#0000ff"><font size="2"><span></span></font></font></font> </div>
<div><font face="Arial"><font color="#0000ff"><font size="2"><span>5. I ran the tail -f command on the error_log file, and 
went through the motions of clicking on the links of the main page. The error 
messages appeared</span></font></font></font></div>
<div><font face="Arial"><font color="#0000ff"><font size="2"><span>   on-screen, while the following entries 
appeared in the log file:</span></font></font></font></div>
<div><font face="Arial"><font color="#0000ff"><font size="2"><span></span></font></font></font> </div>
<div><span><font color="#0000ff" face="Arial" size="2">      [Thu Jun 25 10:29:38 2009] [error] 
[<nagios server>] File does not exist: /usr/local/nagios/share/cgi-bin, 
referer: </font><a href="http://132.183.12.194/nagios/side.php" target="_blank"><font face="Arial" size="2">http://<nagios server>/nagios/side.php</font></a><br><font color="#0000ff" face="Arial" size="2">      [Thu Jun 25 
10:29:44 2009] [error] [<nagios server>] File does not exist: 
/usr/local/nagios/share/cgi-bin, referer: </font><a href="http://132.183.12.194/nagios/side.php" target="_blank"><font face="Arial" size="2">http://<nagios server>/nagios/side.php</font></a><br><font color="#0000ff" face="Arial" size="2">      [Thu Jun 25 
10:29:48 2009] [error] [<nagios server>] File does not exist: 
/usr/local/nagios/share/cgi-bin, referer: </font><a href="http://132.183.12.194/nagios/side.php" target="_blank"><font face="Arial" size="2">http://<nagios server>/nagios/side.php</font></a></span></div></div></blockquote>
<div><br>OK... you can see here that apache has been configured to look for the CGIs in /usr/local/nagios/share/cgi-bin, not /usr/local/nagios/sbin. This must be the definition in the apache configuration file in /etc/httpd/conf.d .<br>
 </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div><span><a href="http://132.183.12.194/nagios/side.php" target="_blank"><font face="Arial" size="2"></font></a><br>
</span></div>
<div dir="ltr" align="left"><span></span><font color="#0000ff" face="Arial" size="2">6<span>. When I go to the 
http://<nagioshost>/nagios page, I get the splash screen for the Nagios 
application. The error occurs whenever I click on any of the</span></font></div>
<div dir="ltr" align="left"><span></span><span></span><font color="#0000ff" face="Arial" size="2"> <span>   links starting from the 
Current Status group and going down the list.</span></font></div></div></blockquote><div><br>OK.<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"><span> </span></font></div>
<div><font color="#0000ff" face="Arial" size="2"><span></span></font> </div>
<div><font color="#0000ff" face="Arial" size="2"><span>7. The 
host in question is a CentOS 5.3 system running on the i386 
architecture.</span></font></div>
<div><font color="#0000ff" face="Arial" size="2"><span></span></font> </div>
<div><font color="#0000ff" face="Arial" size="2"><span>8. The 
original Nagios 2.6 directory was copied as a tar file and via sftp from 
the original Nagios server to the new one. The tar file was extracted into 
the</span></font></div>
<div><span></span><span><font color="#0000ff" face="Arial" size="2">    /usr/local directory. The 
nagios user and group were created, with the former being given a home directory 
and utilizing the nologin shell. The Nagios </font></span></div>
<div><span><font color="#0000ff" face="Arial" size="2">   3.1.2 application was compiled from source on the new 
server, with the following arguments:</font></span></div>
<div><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div><span>    <font color="#0000ff" face="Arial" size="2">configured by ./configure, generated by GNU Autoconf 2.61, 
with options \"'--prefix=/usr/local/nagios' '--with-nagios-user=nagios' 
'--with-nagios-grp=nagios'\"</font></span></div></div></blockquote><div><br>OK. Provided nagios itself is running, that's probably fine.<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div><span><font color="#0000ff" face="Arial" size="2"></font></span></div>
<div><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div><span><font color="#0000ff" face="Arial" size="2">What 
do you think?</font></span></div>
<div><span><font color="#0000ff" face="Arial" size="2"></font></span> </div></div></blockquote><div><br>Cheers,<br>Guy.<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div>
<div><span></span> </div>
<div><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left"><br><br></div><br>
<div dir="ltr" align="left" lang="en-us">
<hr>
<font face="Tahoma" size="2"><b>From:</b> Guy Waugh [mailto:<a href="mailto:guidosh@gmail.com" target="_blank">guidosh@gmail.com</a>] 
<br><b>Sent:</b> Thursday, June 25, 2009 9:57 AM<br><b>To:</b> Kaplan, Andrew 
H.; <a href="mailto:nagios-users@lists.sourceforge.net" target="_blank">nagios-users@lists.sourceforge.net</a><div class="im"><br><b>Subject:</b> Re: [Nagios-users] 
Problem getting past main page<br></div></font><br></div>
<div></div>Hi again,<br><br>Strange...<br><br>Some questions:<br><br>You're sure 
you restarted apache after editing httpd.conf?<br>What is the output of 
'apachectl configtest'?<br>What files are in /usr/local/nagios/sbin -- are they 
files like 'status.cgi', 'avail.cgi', 'cmd.cgi' etc.? Are they executable by the 
user that apache is running as?<br>Is there anything useful in the apache error 
logs?<br>What do you see when you go to http://<nagioshost>/nagios with 
your web browser? Is that when you get the error below?<br>Is the nagios host a 
Linux or Unix host (sorry, can't remember if you've specified this before)? If 
so, which flavour/version?<br>Did you compile nagios on this host, install it 
via a package manager, or copy it from another 
host?<br><br>Cheers,<br>Guy.<br><br>
<div class="gmail_quote">On Thu, Jun 25, 2009 at 2:35 PM, Kaplan, Andrew H. <span dir="ltr"><<a href="mailto:AHKAPLAN@partners.org" target="_blank">AHKAPLAN@partners.org</a>></span> 
wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
  <div>
  <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Hi there 
  --</font></span></div>
  <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
  <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Thanks for 
  your reply. I made the change that you suggested, and subsequently restarted 
  the Apache and Nagios applications.</font></span></div>
  <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
  <div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Unfortunately, the problem still occurs. Here is the output that I 
  am seeing:</font></span></div>
  <div dir="ltr" align="left"><span></span> </div>
  <div dir="ltr" align="left"><span><div class="im">
  <div>
  <h1><font face="Arial" size="2">Not Found</font></h1>
  <p><font face="Arial" size="2">The requested URL /nagios/cgi-bin/status.cgi was 
  not found on this server.</font></p></div>
  </div><p><span><font color="#0000ff" face="Arial" size="2">I can't figure out what is 
  going on with this. Enclosed is the updated version of the httpd.conf with the 
  changes that were suggested.</font></span></p>
  <p><span><font color="#0000ff" face="Arial" size="2">I am desperate at this 
  point...</font></span></p>
  <p><span><font color="#0000ff" face="Arial" size="2"></font></span> </p>
  <p><span><font color="#0000ff" face="Arial" size="2"></font></span> </p><font face="Arial" size="2"> </font></span></div><br>
  <div dir="ltr" align="left" lang="en-us">
  <hr>
  <font face="Tahoma" size="2"><b>From:</b> Guy Waugh [mailto:<a href="mailto:guidosh@gmail.com" target="_blank">guidosh@gmail.com</a>] 
  <br><b>Sent:</b> Thursday, June 25, 2009 4:15 AM<br><b>To:</b> Kaplan, Andrew 
  H.; <a href="mailto:nagios-users@lists.sourceforge.net" target="_blank">nagios-users@lists.sourceforge.net</a><div class="im"><br><b>Subject:</b> Re: 
  [Nagios-users] Problem getting past main page<br></div></font><br></div>
  <div></div>Hi Andrew,<br><br>
  <div class="gmail_quote"><div class="im">
  <div>On Thu, Jun 25, 2009 at 12:24 AM, Kaplan, Andrew H. <span dir="ltr"><<a href="mailto:AHKAPLAN@partners.org" target="_blank">AHKAPLAN@partners.org</a>></span> wrote:<br>
  <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
    <div>
    <p><font face="Courier New" size="2">This issue is an offshoot of the Problem 
    in preflight check with commands.cfg.</font> </p>
    <p><font face="Courier New" size="2">I went ahead and copied the nagios 
    directory from our original server to the new</font> <br><font face="Courier New" size="2">one. Once that was done, I did the upgrade to 
    version 3.1.2 of nagios. The main page</font> <br><font face="Courier New" size="2">of the application appears without a problem. However, whenever I try 
    to go to any one</font> <br><font face="Courier New" size="2">of the links 
    from the main page, an error message similar to the one below appears</font> 
    <br><font face="Courier New" size="2">on-screen:</font> </p>
    <p><b><font face="Courier New" size="2">Not Found</font></b> <br><b><font face="Courier New" size="2">The requested URL /nagios/cgi-bin/status.cgi was 
    not found on this server.</font></b></p></div></blockquote></div>
  </div><div><br>Looking at your attached httpd.conf file, you seem to have configured 
  the URL '/cgi-bin/nagios' to be the ScriptAlias for the nagios CGIs, but then 
  you are trying to access them with the URL '/nagios/cgi-bin'. Provided the 
  Nagios CGI scripts are in /usr/local/nagios/sbin, as they are by default, you 
  should probably define your ScriptAlias like this:<br><br>ScriptAlias 
  /nagios/cgi-bin 
"/usr/local/nagios/sbin"<br><br>Cheers,<br>Guy.<br> </div><div class="im">
  <div>
  <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
    <div>
    <p><b><font face="Courier New" size="2"></font></b></p><br>
    <p><font face="Courier New" size="2">I noticed that after I inserted the 
    snippets from the nagios.conf file into the </font><br><font face="Courier New" size="2">httpd.conf file, and subsequently restarted the 
    Apache server, the following</font> <br><font face="Courier New" size="2">errors appeared on-screen:</font> </p>
    <p><b><font face="Courier New" size="2">Starting httpd: The ScriptAlias 
    directive in /etc/httpd/conf/httpd.conf at line</font></b> <br><b><font face="Courier New" size="2">566 will probably never match because it overlaps 
    an earlier ScriptAlias.</font></b> <br><b><font face="Courier New" size="2">[warn] The Alias directive in /etc/httpd/conf/httpd.conf at line 583 
    will</font></b> <br><b><font face="Courier New" size="2">probably never match 
    because it overlaps an earlier Alias.</font></b> </p>
    <p><font face="Courier New" size="2">I have enclosed a copy of the httpd.conf 
    file in its present version. I am at a</font> <br><font face="Courier New" size="2">lossas to why the error message is occurring, and I would really 
    appreciate help on</font> <br><font face="Courier New" size="2">this. 
    </font></p>
    <p><font color="#000000" face="Arial" size="2"><<httpd.conf>> 
    </font></p><pre>The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
<a href="http://www.partners.org/complianceline" target="_blank">http://www.partners.org/complianceline</a> . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.
</pre></div><br>------------------------------------------------------------------------------<br><br>_______________________________________________<br>Nagios-users 
    mailing list<br><a href="mailto:Nagios-users@lists.sourceforge.net" target="_blank">Nagios-users@lists.sourceforge.net</a><br><a href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>
::: 
    Please include Nagios version, plugin version (-v) and OS when reporting any 
    issue.<br>::: Messages without supporting info will risk being sent to 
    /dev/null<br></blockquote></div></div></div><br></div></blockquote></div><br></div>
</blockquote></div><br>