LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 11-24-2004, 06:24 PM   #1
dwarf007
Member
 
Registered: Sep 2004
Location: Malaysia
Posts: 181

Rep: Reputation: 30
Nagios web login error.....


I had tried to login to the nagios apache web, but it comes out the below error.
Can i know what should i do now? Is the configuration error?

My nagios page.......
Code:
http://localhost/nagios/cgi-bin
Authentication required!

This server could not verify that you are authorized to access the URL "/nagios/cgi-bin". You either supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.

In case you are allowed to request the document, please check your user-id and password and try again.

If you think this is a server error, please contact the webmaster

Error 401

localhost
Wed 24 Nov 2004 07:20:53 AM MYT
Apache/2.0.40 (Red Hat Linux)
 
Old 11-25-2004, 02:29 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 65
How id you configure the authentication using http basic auth and password files? Can you post your configuration for this. Did it work ok before you added the authentication?
 
Old 11-25-2004, 06:14 PM   #3
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,164

Rep: Reputation: 330Reputation: 330Reputation: 330Reputation: 330
To add on to what David_Ross said, did you follow the directions in the Nagios documentation for how to set the ScriptAlias configure directive in your httpd.conf and then set the permissions for the /usr/local/nagios/sbin directory? I've been working on a nagios setup at work recently, and you need to be very sure that the directory attributes are set properly in Apache. There's a section in the Nagios documentation that tells you exactly how to do this.
 
Old 11-27-2004, 04:02 AM   #4
dwarf007
Member
 
Registered: Sep 2004
Location: Malaysia
Posts: 181

Original Poster
Rep: Reputation: 30
These are the permission of the directory sbin, i think is ok...

Code:
[root@Linux-Nagios sbin]# ls -l
total 1624
-rwxrwxr-x    1 nagios   nagios     143824 Nov 23 02:54 avail.cgi
-rwxrwxr-x    1 nagios   nagios     144924 Nov 23 02:54 cmd.cgi
-rwxrwxr-x    1 nagios   nagios     113872 Nov 23 02:54 config.cgi
-rwxrwxr-x    1 nagios   nagios     160292 Nov 23 02:54 extinfo.cgi
-rwxrwxr-x    1 nagios   nagios     105764 Nov 23 02:54 history.cgi
-rwxrwxr-x    1 nagios   nagios     101604 Nov 23 02:54 notifications.cgi
-rwxrwxr-x    1 nagios   nagios      98072 Nov 23 02:54 outages.cgi
-rwxrwxr-x    1 nagios   nagios     100292 Nov 23 02:54 showlog.cgi
-rwxrwxr-x    1 nagios   nagios     145148 Nov 23 02:54 status.cgi
-rwxrwxr-x    1 nagios   nagios     114864 Nov 23 02:54 statuswml.cgi
-rwxrwxr-x    1 nagios   nagios     108792 Nov 23 02:54 statuswrl.cgi
-rwxrwxr-x    1 nagios   nagios     119184 Nov 23 02:54 summary.cgi
-rwxrwxr-x    1 nagios   nagios     123100 Nov 23 02:54 tac.cgi
These are the http.conf file configuration, i add on this two at the end of the http.conf file.....

Code:
ScriptAlias /nagios/cgi-bin/ /usr/local/nagios/sbin/
<Directory "/usr/local/nagios/sbin/">
    AllowOverride AuthConfig
    Options ExecCGI
    Order allow,deny
    Allow from all
</Directory>
Code:
Alias /nagios/ /usr/local/nagios/share/
Alias /nagios "/usr/local/nagios/share/"
<Directory "/usr/local/nagios/share">
    Options None
    AllowOverride AuthConfig
    Order allow,deny
    Allow from all
</Directory>
I had a file htpasswd.users in /usr/local/nagios/etc
I had one file .htaccess in /usr/local/nagios/sbin and also in /usr/local/nagios/share

I had follow what is in the documentation. What else i am left behind or anythings go wrong?

Anyone knows, please help.........
Thank You.....
 
Old 11-27-2004, 10:02 AM   #5
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 65
Can you post the contents of .htaccess (just one if they are the same). Did you add users to your htpasswd file with "htpasswd"?
 
Old 11-28-2004, 05:46 AM   #6
dwarf007
Member
 
Registered: Sep 2004
Location: Malaysia
Posts: 181

Original Poster
Rep: Reputation: 30
Thank You for the help.....

The problem is solved, but now i encounter another problem which is.

---------------------------------------------------------------------------
Access forbidden!

You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.

If you think this is a server error, please contact the webmaster

Error 403

linux-nagios
Sat 27 Nov 2004 06:42:03 PM MYT
Apache/2.0.40 (Red Hat Linux)
---------------------------------------------------------------------------

Can i know whats is the problem? The folder /usr/local/nagios/sbin originally only has cgi file inside and i had change all of them to 777 permission.

Anyone knows please help........
Thank You
 
Old 11-28-2004, 01:51 PM   #7
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 65
What url were you trying to access?

Can you post the last few lines from your error_log.
 
Old 11-28-2004, 03:02 PM   #8
dwarf007
Member
 
Registered: Sep 2004
Location: Malaysia
Posts: 181

Original Poster
Rep: Reputation: 30
Thanks for the reply

The below are the "error_log" are from the directory /var/log/httpd/error_log

[Sun Nov 28 03:44:19 2004] [notice] caught SIGTERM, shutting down [Sun Nov 28 03:44:21 2004] [notice] Digest: generating secret for digest authentication ... [Sun Nov 28 03:44:21 2004] [notice] Digest: done [Sun Nov 28 03:44:22 2004] [notice] Apache/2.0.40 (Red Hat Linux) configured -- resuming normal operations [Sun Nov 28 03:44:46 2004] [error] [client 127.0.0.1] attempt to invoke directory as script: /usr/local/nagios/sbin/

What going on actually?
 
Old 11-28-2004, 06:38 PM   #9
M4tth3wV
LQ Newbie
 
Registered: Nov 2004
Location: 30303
Distribution: Debian
Posts: 5

Rep: Reputation: 0
Is there a reason why you have two "Alias" statements in your Apache config?

Also, does all this work when you don't enable htaccess?
 
Old 11-29-2004, 11:09 AM   #10
dwarf007
Member
 
Registered: Sep 2004
Location: Malaysia
Posts: 181

Original Poster
Rep: Reputation: 30
Does it really matter where the httpd.conf has more than one Alias or ScriptAlias? I had more than 2 for both of them.

As what i saw from the configuration for httpd.conf at nagios support, they didnt ask to remove duplicate Alias and ScriptAlias.........

My major problem is cant view the page http://localhost/nagios/cgi-bin/

----------------------------------------------------------------------
Access forbidden!

You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.

If you think this is a server error, please contact the webmaster

Error 403

linux-nagios
Sun 28 Nov 2004 11:57:55 PM MYT
Apache/2.0.40 (Red Hat Linux)
-----------------------------------------------------------------------

In http://localhost/nagios/ , i had a problem of below function when i tried to access
- Status Map (Monitoring)
- Trends (Reporting)
- Alert Histogram (Reeporting)

-----------------------------------------------------------------------
Object not found!

The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.

If you think this is a server error, please contact the webmaster

Error 404

linux-nagios
Mon 29 Nov 2004 12:06:20 AM MYT
Apache/2.0.40 (Red Hat Linux)

-----------------------------------------------------------------------

Anyone knows, please help.
Thank You........
 
Old 11-29-2004, 12:48 PM   #11
M4tth3wV
LQ Newbie
 
Registered: Nov 2004
Location: 30303
Distribution: Debian
Posts: 5

Rep: Reputation: 0
I'm not sure if having multiple Alias's matter or not, but I'd make my config as simple as possible. Remove restricted access, make apache exactly like the Nagios documentation.

I had some issues getting Nagios up, but it was more than worth it. It's been rock solid for over a year.
 
Old 12-17-2004, 04:40 AM   #12
mnl
LQ Newbie
 
Registered: Dec 2004
Posts: 2

Rep: Reputation: 0
Hello,

I have been using nagios 1.1 on an Apache1.3 server for more than a year now with extreme satisfaction.

I recently updated to Apache 2.0.40 (standard issue on the flavor of Redhat I have installed) and I cannot get the authentication to work...

Nagios' CGIs run just fine, but the authentication does not. If I activate it (either with .htaccess or a <Directory> tag inside httpd.conf) and I try browsing to Nagios, the requester popup does _not_ show, but I get an "Authorization required" message from Apache as though I had tried to log in and failed. I mean, Apache doesn't even give me a try!

I am very sure I replicated my working configuration but it just doesn't work as expected.

I appreciate any help you can give me on this.

Thanks!
 
Old 12-17-2004, 05:26 AM   #13
mnl
LQ Newbie
 
Registered: Dec 2004
Posts: 2

Rep: Reputation: 0
All right, problem solved. I had to comment out all ErrorDocument lines in httpd.conf (they were producing 404's). Thanks anyway
 
Old 12-17-2004, 06:52 AM   #14
the-chains
LQ Newbie
 
Registered: Jul 2004
Distribution: Red Hat
Posts: 11

Rep: Reputation: 0
Are you sure there is a nagios process?
or else start it
ie:
./nagios -d ../etc/nagios.cfg

and read the documentation as for authentication
ifor example, if you want to do host checks, you need to make sure you are in one of the contact and contactgroup...

There's a lot to Nagios
 
Old 01-04-2005, 09:06 PM   #15
dwarf007
Member
 
Registered: Sep 2004
Location: Malaysia
Posts: 181

Original Poster
Rep: Reputation: 30
Thanks for all of you guys reply

I setup the web server (httpd) in both Fedora Core 2 and Red Hat 9. I found out it doesnt work in
Fedora Core 2, even with the same nagios config for httpd.conf.

I am still not sure with this yet. Any of you guys experience with the same problem as well?

I had tried in Red Hat 9 and it works only (Ping) host currently. Any of you have a good reference for the confiiguration? Other than (Check Host Alive, Ping), what are the good features in Nagios to be use?

Thank You.....
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nagios (403 Error) cuiguy Linux - Software 1 04-05-2005 07:27 PM
nagios error messages kenji1903 Linux - Networking 9 08-21-2004 06:07 AM
login problem nagios misba672 Linux - Newbie 2 10-14-2003 08:13 PM
Nagios Web Interface JPawlak Linux - Software 1 08-22-2003 04:49 PM
Nagios Web Interface sanfran49 Linux - Software 6 07-15-2003 11:36 AM


All times are GMT -5. The time now is 04:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration