Page 2 of 3

Re: RE: Nagios Home Page

Posted: Wed Mar 27, 2013 11:06 am
by abrist
Try enabling "use_authentication" in your cgi.cfg by changing the line to:

Code: Select all

use_authentication=1
Then restart apache and nagios:

Code: Select all

service nagios restart
service httpd restart

Re: RE: Nagios Home Page

Posted: Wed Mar 27, 2013 11:19 am
by devilsguest
I don't see any change after restart..... :?:

Re: RE: Nagios Home Page

Posted: Wed Mar 27, 2013 11:22 am
by abrist
Any change in the error logs?

Code: Select all

tail /var/log/httpd/error_log
These problems are most likely due to cgi issues. You may have permission/path problems or vhost config issues.

Re: RE: Nagios Home Page

Posted: Wed Mar 27, 2013 11:27 am
by devilsguest
I don't have any problem with path or permission because i checked path and permissions by myself. The only problem that I am facing is with configuring nagios vhost to apache 2.4.4 due to the changes made by apache during upgrade from 2.2 to 2.4. Can you help me, How do i config my nagios vhost to match apache 2.4.4????

Re: RE: Nagios Home Page

Posted: Wed Mar 27, 2013 11:45 am
by abrist
Do you have :

Code: Select all

Options +ExecCGI
AddHandler cgi-script .cgi 
Declared in your httpd.conf?

Re: RE: Nagios Home Page

Posted: Wed Mar 27, 2013 11:54 am
by devilsguest
Nope...

Re: RE: Nagios Home Page

Posted: Wed Mar 27, 2013 12:34 pm
by abrist
You vhost config may not be right for the location of your cgis. Where are your nagios html and cgi files located?

Code: Select all

ls /usr/local/nagios/sbin/
ls /usr/local/nagios/share/nagios/cgi-bin
ls /usr/local/nagios/share

Re: RE: Nagios Home Page

Posted: Wed Mar 27, 2013 1:11 pm
by devilsguest
/usr/local/nagios/sbin

Code: Select all

-rwxrwxr-x  1 nagios nagios 239716 Mar 25 23:10 avail.cgi
-rwxrwxr-x  1 nagios nagios 241648 Mar 25 23:10 cmd.cgi
-rwxrwxr-x  1 nagios nagios 217668 Mar 25 23:10 config.cgi
-rwxrwxr-x  1 nagios nagios 258660 Mar 25 23:10 extinfo.cgi
-rwxrwxr-x  1 nagios nagios 194148 Mar 25 23:10 history.cgi
-rwxrwxr-x  1 nagios nagios 193124 Mar 25 23:10 notifications.cgi
-rwxrwxr-x  1 nagios nagios 185252 Mar 25 23:10 outages.cgi
-rwxrwxr-x  1 nagios nagios 189860 Mar 25 23:10 showlog.cgi
-rwxrwxr-x  1 nagios nagios 252100 Mar 25 23:10 status.cgi
-rwxrwxr-x  1 nagios nagios 205444 Mar 25 23:10 statuswml.cgi
-rwxrwxr-x  1 nagios nagios 190308 Mar 25 23:10 statuswrl.cgi
-rwxrwxr-x  1 nagios nagios 209700 Mar 25 23:10 summary.cgi
-rwxrwxr-x  1 nagios nagios 205476 Mar 25 23:10 tac.cgi
/usr/local/nagios/share

Code: Select all

drwxr-xr-x  5 root   root   4096 Aug 23  2010 arana_style
-rw-rw-r--  1 nagios nagios  576 Mar 25 23:10 config.inc.php
drwxrwxr-x  2 nagios nagios 4096 Mar 25 23:10 contexthelp
drwxrwxr-x  3 nagios nagios 4096 Mar 25 23:10 docs
drwxrwxr-x  3 nagios nagios 4096 Mar 25 23:10 images
drwxrwxr-x  3 nagios nagios 4096 Mar 25 23:10 includes
-rw-rw-r--  1 nagios nagios 1608 Mar 25 23:10 index.php
drwxrwxr-x  2 nagios nagios 4096 Mar 25 23:10 js
drwxr-xr-x  4 root   root   4096 Mar 25 23:17 locale
-rw-rw-r--  1 nagios nagios 5864 Mar 25 23:10 main.php
drwxrwxr-x  2 nagios nagios 4096 Mar 25 23:10 media
-rw-rw-r--  1 nagios nagios   26 Mar 25 23:10 robots.txt
-rw-rw-r--  1 nagios nagios  941 Mar 25 23:10 rss-corefeed.php
-rw-rw-r--  1 nagios nagios  995 Mar 25 23:10 rss-newsfeed.php
-rw-rw-r--  1 nagios nagios 5756 Mar 25 23:10 side.php
drwxrwxr-x  2 nagios nagios 4096 Mar 25 23:10 ssi
drwxrwxr-x  2 nagios nagios 4096 Mar 25 23:10 stylesheets
But I don't see any directory named /nagios/cgi-bin under /usr/local/nagios/share/

Re: RE: Nagios Home Page

Posted: Wed Mar 27, 2013 2:00 pm
by abrist
You will need to change the the share script alias line: ScriptAlias /nagios "/usr/local/nagios/share/nagios/cgi-bin" to ScriptAlias /nagios "/usr/local/nagios/share/" You are using the Authtype "Digest". Did you generate the key with htpasswd or htdigest?

Code: Select all

ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin/"
<Directory "/usr/local/nagios/sbin/">
AllowOverride None
Options ExecCGI
Require all granted
AuthName "Nagios Web Access"
AuthType Digest
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
</Directory>

ScriptAlias /nagios "/usr/local/nagios/share/"

<Directory "/usr/local/nagios/share/">
Options None
AllowOverride None
Require all granted
AuthName "Nagios Web Access"
AuthType Digest
AuthUserFile /usr/local/nagios/etc/htpasswd.users
Require valid-user
</Directory>

Re: RE: Nagios Home Page

Posted: Thu Mar 28, 2013 8:44 am
by devilsguest
In your question "Did you generate the key with htpassword or htdigest?" I don't understand what type of key you are exactly asking me about. According to my understanding, I think that I have used "htpasswd" because I used htpasswd -c command to create username and password for login credentials.