htaccess authorization error..

Marc Powell marc at ena.com
Wed Feb 21 17:45:28 CET 2007



> -----Original Message-----
> From: nagios-users-bounces at lists.sourceforge.net [mailto:nagios-users-
> bounces at lists.sourceforge.net] On Behalf Of abid dar
> Sent: Tuesday, February 20, 2007 8:32 PM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] htaccess authorization error..
> 
> So I am getting the infamous cgi access error:
> 
> "It appears as though you do not have permission to view information
for
> any of the services you requested..
> 


> <Directory "/usr/local/nagios/sbin">
>     Options ExecCGI
>     AllowOverride None
>     Order allow,deny
>     Allow from all
>     AuthName "Nagios Access"
>     AuthType Basic
>     AuthUserFile /usr/local/nagios/etc/htpasswd.users
>     Require valid-user
> </Directory>

> --my .htaccess file that is the sbin folder
> 
> AuthName "Nagios Access"
> AuthType Basic
> AuthUserFile /usr/local/nagios/etc/htpasswd.users
> require valid-user

This would be redundant. You've enabled it as part of your <Directory>
config above. Not harmful though as you've told Apache to completely
ignore .htaccess in that directory with the 'AllowOverride None'
directive above.

> When I first go to nagios page
> 
> http://localhost/nagios/
> 
> I get prompted for a username and password and then it lets me in the
site
> but when I click on any links it get the authorization error.

That's good that you get prompted and then allowed in. Who does nagios
show you Logged in as? Is it what you expect?
 
> this has got to be a simple problem with .htpasswd or .htaccess right?

So far, it sounds like the answer is no.
 
> when I created the files I followed the documentation and the fact it
lets
> me initially but not into the sub links I get that error..
> 
> any thoughts?

Is the username you are logged in as listed as a contact for any hosts
or services? It must be or you must grant global permissions via the
authorized_for_* directives in cgi.cfg. Nagios simply looks at the
REMOTE_USER environment variable set by Apache after you log in and
matches that against defined contacts{} to determine what to show. If
there is no match then the behavior you're seeing is the result.

--
Marc

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list