Thanks, I tried both, but still no luck. I added the auth lines to the /share share dir too. I also tried Patrick's AllowOverride. I now get a login prompt when I go to my main nagios page (
http://nnn.nnn.nnn.nnn/nagios), but it doesn't appear to pass along to the CGI's or nagios can't figure it out. The authentication now works for the html (the /share stuff) as it let's me log in. If I then click on any of the cgi links, etc... I get the "you do not have permission" messages. I also still have the "Logged in as: ?" at the top of the pages (like the tac overview page).
So the pertinent lines in my httpd.conf now appear as :
ScriptAlias /nagios/cgi-bin /opt/nagios/sbin
<Directory /opt/nagios/sbin>
AllowOverride AuthConfig
Options +ExecCGI
Order allow,deny
Allow from all
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /opt/nagios/etc/htpasswd.users
Require valid-user
</Directory>
<Directory /opt/nagios/sbin>
AllowOverride AuthConfig
Options +ExecCGI
Order allow,deny
Allow from all
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /opt/nagios/etc/htpasswd.users
Require valid-user
</Directory>
Alias /nagios /opt/nagios/share
<Directory /opt/nagios/share>
Options None
AllowOverride None
Order allow,deny
Allow from all
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /opt/nagios/etc/htpasswd.users
Require valid-user
</Directory>
-b
On 5/31/06, frank <[EMAIL PROTECTED]> wrote:
I think you have to add the auth lines to the /share directory too. Right
now you're only authing on the CGIs which aren't hit on your initial
connection to Nagios. (The frameset all comes from the /share dir)
-f
On Wed, 31 May 2006, Brad Clemmons Jr wrote:
> Date: Wed, 31 May 2006 12:33:56 -0400
> From: Brad Clemmons Jr < [EMAIL PROTECTED]>
> To: [email protected]
> Subject: [Nagios-users] Authentication problem (apache basic)
>
> Ok, I know this is probably a problem with my configuration so I need new
> eyes to look at this.
> I have nagios configured and working WITHOUT AUTHENTICATION
> (use_authentication=0 in cgi.cfg). If I turn on authentication I don't even
> get a login prompt on the page for nagios.
>
> Here is my script alias stuff in httpd.conf with the auth parameters:
>
> ScriptAlias /nagios/cgi-bin /opt/nagios/sbin
> <Directory /opt/nagios/sbin>
> AllowOverride None
> Options +ExecCGI
> Order allow,deny
> Allow from all
> AuthName "Nagios Access"
> AuthType Basic
> AuthUserFile /opt/nagios/etc/htpasswd.users
> Require valid-user
> </Directory>
>
> Alias /nagios /opt/nagios/share
> <Directory /opt/nagios/share>
> Options None
> AllowOverride None
> Order allow,deny
> Allow from all
> </Directory>
>
>
> The htpasswd.users file was created using the following command syntax:
>
> htpasswd -c /opt/nagios/etc/htpasswd.users myusername
>
> I made sure the correct user/groups could read the htpasswd.users file:
>
> chown root.apache /opt/nagios/etc/htpasswd.users
> chmod 640 /opt/nagios/etc/htpasswd.users
>
> In my cgi.cfg I have use authentication=1 and all commands below it I have
> the username I added (ie: authorized_for_system_information=myusername).
>
> At any rate, I get to my nagios main page without any request for login. So
> at the top of the Tactical overview page I have this:
> Tactical Monitoring Overview
> Last Updated: Tue May 30 13:25:34 EDT 2006
> Updated every 90 seconds
> Nagios(r) - www.nagios.org
> Logged in as ?
>
> Now, Once I click on one of the cgi pages like Service Details, I get the
> following message:
>
> It appears as though you do not have permission to view information for any
> of the services you requested...
> If you believe this is an error, check the HTTP server authentication
> requirements for accessing this CGI
> and check the authorization options in your CGI configuration file.
>
>
> I checked the apache error.log and there's nothing in there recently except
> the apache restart notices when I restart apache.
> [Tue May 30 12:50:40 2006] [notice] SIGHUP received. Attempting to restart
> [Tue May 30 12:50:40 2006] [notice] Apache/1.3.33 (Debian GNU/Linux)
> mod_python/2.7.10 Python/2.3.4 PHP/4.3.10-16 mod_perl/1.29 configured --
> resuming normal operations
>
> Any idea's as to why it never prompted me to log in? Also, this is on Apache
> 1.3 and Nagios 2.3.
>
> -Thanks
>
_______________________________________________ Nagios-users mailing list [email protected] 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
