LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Nagios web login error..... (https://www.linuxquestions.org/questions/linux-software-2/nagios-web-login-error-258965/)

dwarf007 11-24-2004 05:24 PM

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)

david_ross 11-25-2004 01:29 PM

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?

btmiller 11-25-2004 05:14 PM

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.

dwarf007 11-27-2004 03:02 AM

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

david_ross 11-27-2004 09:02 AM

Can you post the contents of .htaccess (just one if they are the same). Did you add users to your htpasswd file with "htpasswd"?

dwarf007 11-28-2004 04:46 AM

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 :)

david_ross 11-28-2004 12:51 PM

What url were you trying to access?

Can you post the last few lines from your error_log.

dwarf007 11-28-2004 02:02 PM

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?

M4tth3wV 11-28-2004 05:38 PM

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?

dwarf007 11-29-2004 10:09 AM

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

M4tth3wV 11-29-2004 11:48 AM

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.

mnl 12-17-2004 03:40 AM

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! :)

mnl 12-17-2004 04:26 AM

All right, problem solved. I had to comment out all ErrorDocument lines in httpd.conf (they were producing 404's). Thanks anyway :D

the-chains 12-17-2004 05:52 AM

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

dwarf007 01-04-2005 08:06 PM

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


All times are GMT -5. The time now is 09:44 PM.