RE: Nagios Home Page

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: RE: Nagios Home Page

Post 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
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
devilsguest
Posts: 76
Joined: Wed Mar 20, 2013 7:15 pm
Location: New York

Re: RE: Nagios Home Page

Post by devilsguest »

I don't see any change after restart..... :?:
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: RE: Nagios Home Page

Post 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.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
devilsguest
Posts: 76
Joined: Wed Mar 20, 2013 7:15 pm
Location: New York

Re: RE: Nagios Home Page

Post 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????
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: RE: Nagios Home Page

Post by abrist »

Do you have :

Code: Select all

Options +ExecCGI
AddHandler cgi-script .cgi 
Declared in your httpd.conf?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
devilsguest
Posts: 76
Joined: Wed Mar 20, 2013 7:15 pm
Location: New York

Re: RE: Nagios Home Page

Post by devilsguest »

Nope...
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: RE: Nagios Home Page

Post 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
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
devilsguest
Posts: 76
Joined: Wed Mar 20, 2013 7:15 pm
Location: New York

Re: RE: Nagios Home Page

Post 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/
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: RE: Nagios Home Page

Post 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>
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
devilsguest
Posts: 76
Joined: Wed Mar 20, 2013 7:15 pm
Location: New York

Re: RE: Nagios Home Page

Post 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.
Locked