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 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) |
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?
|
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.
|
These are the permission of the directory sbin, i think is ok...
Code:
[root@Linux-Nagios sbin]# ls -l Code:
ScriptAlias /nagios/cgi-bin/ /usr/local/nagios/sbin/ Code:
Alias /nagios/ /usr/local/nagios/share/ 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..... |
Can you post the contents of .htaccess (just one if they are the same). Did you add users to your htpasswd file with "htpasswd"?
|
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 :) |
What url were you trying to access?
Can you post the last few lines from your error_log. |
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? |
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? |
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........ |
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. |
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! :) |
All right, problem solved. I had to comment out all ErrorDocument lines in httpd.conf (they were producing 404's). Thanks anyway :D
|
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 |
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..... |
Are you using SELinux in FC2?
|
how to check whethere is SELinux? I only know i am using FC2 :)
What are the best part of nagios? So far i am only know the use of Ping host alive. Any of you know the other part of nagios? |
I'm having a similar problem
On trying to access my local testing servers nagios installation (http://192.168.0.135/nagios) I get the following error: Forbidden You don't have permission to access /nagios/ on this server. -------------------------------------------------------------------------------- Apache/2.0.49 (Fedora) Server at 192.168.0.135 Port 80 I have no .htaccess files as I took them out to try and rectify the problem. My httpd.conf file looks like this: ScriptAlias /nagios/cgi-bin /usr/local/nagios/sbin <Directory "/usr/local/nagios/sbin"> AllowOverride AuthConfig Options ExecCGI Order allow,deny Allow from all </Directory> Alias /nagios /usr/local/nagios/share <Directory "/usr/local/nagios/share"> Options None AllowOverride AuthConfig Order allow,deny Allow from all </Directory> Ive restarted apache several times. Other dirs work, but they are located in /var/www/html/.... so it must just be the alias. Im running fedora core 2 - which may be the cause of my problems! |
I think u need to change the access permission for both
/usr/local/nagios/etc and /usr/local/nagios/sbin change this permission to 777 or 755, i tried with 777 and is ok I am configuring nagios in RedHat 9 and its work fine. for Fedora Core 2 , i had tried before, there is some problem when you access the nagios page. It didnt works even i copy the my RedHat 9 httpd.conf (which includes script alias and alias for nagios) to Fedora Core 2 I hope this help you..... |
thanks, it didnt work - so it might just be FC2.
does anyone know if there are any problems with running nagios in FC3?? Or anyone got more suggestions for getting it running in FC2?? |
I think is better to stick with RedHat 9 , Fedora Core seems much more better to be use for Desktop purpose. I think RedHat 9 is more stable, if you need new packages, just upgrade :)
If you are going for Nagios, i suggest use RedHat 9 should be no issues. |
thanks for ur help!
I'll have to see if i can get my hands on a copy of RH9 (I havent got fast internet so downloading isnt an option). In the mean time, any help will be appreciated!!!!!! |
i got a copy of fc3, and fixed my problem with not being able to access /naigos/
but i now get the following msg when trying to access the CGIs Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. -------------------------------------------------------------------------------- Apache/2.0.52 (Fedora) Server at 192.168.0.5 Port 80 Server Log: [Sun Mar 20 21:16:02 2005] [error] [client 192.168.0.219] (13)Permission denied: exec of '/usr/local/nagios/sbin/tac.cgi' failed, referer: http://192.168.0.5/nagios/side.html [Sun Mar 20 21:16:02 2005] [error] [client 192.168.0.219] Premature end of script headers: tac.cgi, referer: http://192.168.0.5/nagios/side.html I've got the whole of the /usr/local/nagios dir set to permissions of 777 .. I'm stumped when it comes to looking for the source of this problem! |
I had check with my "tag.cgi" file, we cant config the file cause cant open by vi.
This might be Apache server again.... I am not sure with is kernel or might be many thing else. |
Ok.. ive finally fixed the problem mentioned above. it ended up being somthing to do with selinux.
Now I'm faced with the following error when trying to access the cgi's!! Whoops! Error: Could not open CGI config file '/usr/local/nagios/etc/cgi.cfg' for reading! Here are some things you should check in order to resolve this error: Make sure you've installed a CGI config file in its proper location. See the error message about for details on where the CGI is expecting to find the configuration file. A sample CGI configuration file (named cgi.cfg) can be found in the sample-config/ subdirectory of the Nagios source code distribution. Make sure the user your web server is running as has permission to read the CGI config file. Make sure you read the documentation on installing and configuring Nagios thoroughly before continuing. If all else fails, try sending a message to one of the mailing lists. More information can be found at http://www.nagios.org. The file is there (because i can VI it) and the etc/ dir has permissions of 777. Help anyone?? |
It seems that was the access of the nagios permission.
Do you manage to access the nagios monitoring site? Mine is http://NagiosServerIP/nagios/ What did you get after you access this site? Make sure you also start httpd service and nagios service. If you got permission error, you can have a read on the documentation which stated how to create a nagios login user which access the URL. the cgi.cfg is the main file to control your nagios other files. Make sure you configure your nagios proper when install it, that is the key to make it work cause the path pointing Dont know answer your question or not? I dont really understand your situation...... I still have a lot of thing cant manage to configure in nagios, it is tough. Once done, it will be nice :) Hope this help you.... |
I can access http://nagiosIP/nagios/ fine - otherwise i wouldnt be getting the above error message.
As I unsderstand it, if you dont have the permissions (ie .htaccess) files set up and in the directory, you should be able to access the cgi files - I have been able to do that previously in my FC2 setup. The cgi file has the right path: Error: Could not open CGI config file '/usr/local/nagios/etc/cgi.cfg' for reading! As i said, the file that is in that error message is there and it has 777 permissions. I really have no idea whats the problem here, but thanks for your help! |
I think this happen might be you accidently change some commands or add in invalid text in the cgi.cfg file. Then the file couldnt manage to run completely.
Since you can vi the file and with 777 permission, i think that is the only reason you cant run the file. Maybe you should get back the original cgi.cfg file and reconfigure again. Hope this help you... |
i just tried using the sample cgi.cfg (after renaming it to its right filename) and it didnt work!!!
|
nagios did not emit a sound alarm
Hi d!
I have problem with Nagios, I want it to send an alarm to my speaker everytime a host is down. Could you help me out with this problem?! In my cgi.cfg I enabled: host_unreachable_sound=hostdown.wav service_critical_sound=hostdown.wav .... .... And I have all these wavs in /usr/local/nagios/share/media/ BR |
Sorry brother, I never use the sound notification before. I setup this at my previous company, I didnt use Nagios now.
|
About the ScriptAlias and Nagios
Hey, your error solve already?
May I know where should i put this 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> is read it some manual on this page (http://nagios.sourceforge.net/docs/1_0/installweb.html) said that add into the httpd.conf Then the manual say /etc/rc.d/init.d/httpd restart. Inside /etc/rc.d/init.d/ don't have the service call httpd. So I yum install the httpd service. I quite confuse here actually where is the httpd.conf file located? I quite sure is edite the apache "httpd.conf". Why have to restart the /etc/rc.d/init.d/httpd? If don't have the httpd file i still can access the localhost.... I Don't know why? Please clear it for me. Best Regards HenryJack |
Is almost 1 1/2 year i didnt touch with nagios. haha..
If I am not mistaken, the below script should put in httpd.conf file I remember there are 2 items to put in the file. There is a sequence to put it, you have to read on the documentation :) ScriptAlias /nagios/cgi-bin/ /usr/local/nagios/sbin/ <Directory "/usr/local/nagios/sbin/"> AllowOverride AuthConfig Options ExecCGI Order allow,deny Allow from all </Directory> Regarding where is the httpd.conf file locate. Just issue find command to check it. After edit the httpd.conf file, you may need to restart apache and test again. |
Nagios - You don't have permission to access /nagios/cgi-bin/ on this server.
Hello
How you resolve this problem? Can you help me? Thanks... Quote:
|
All times are GMT -5. The time now is 11:13 AM. |