Can't setup authorization for web interface

Anthony Gunia aggunia at comcast.net
Sun Nov 23 18:10:39 CET 2003


Hi Tedman,

Still no luck...I even changed the httpd.conf file back to what the 
O'Reilly articles and the one in October issue of SysAdmin magazine used 
(both pretty much the same) as follows:

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/">
    AllowOverride AuthConfig
    Options None
    Order allow,deny
    Allow from all
  </Directory>

The /usr/local/nagios/etc and /usr/local/nagios/share are read by 
everyone (they are owned by root, and directories are 775 and files are 
664), so this should be OK, right?  I also deleted and recreated the the 
/usr/local/nagios/etc/htpasswd.user file as follows:

htpasswd -c /usr/local/nagios/etc/htpasswd.users username

Deleted the .htaccess and recreated as follows as well:

uthName  "Nagios Access"
AuthType  Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
require valid-user

The above .htaccess is in both the /usr/local/nagios/sbin/ and 
/usr/local/nagios/share/ directories.  A tail on my Apache error_log 
shows the following:

[Sun Nov 23 12:05:04 2003] [notice] caught SIGTERM, shutting down
[Sun Nov 23 12:05:10 2003] [notice] Apache/1.3.27 (Unix)  
(Red-Hat/Linux) mod_ssl/2.8.12 OpenSSL/0.9.6b DAV/1.0.3 PHP/4.1.2 
mod_perl/1.26 configured -- resuming normal operations
[Sun Nov 23 12:05:10 2003] [notice] suEXEC mechanism enabled (wrapper: 
/usr/sbin/suexec)
[Sun Nov 23 12:05:10 2003] [notice] Accept mutex: sysvsem (Default: sysvsem)

Nothing I can see here, so I'm stumped at this point.   I work with 
Apache on Solaris, and this is first time dealing with it on RH 
7.3...using the stock install that came with the OS as opposed to 
building it on Solaris.  So, perhaps I need to adjust the Apache configs 
somewhere else?  Thanks for any help from you and/or anyone else out there!

Anthony
aggunia at comcast.net

Tedman Eng wrote:

>Make sure the htaccess file (or htpasswd.users in your case),
>/usr/local/nagios/etc/ directory,  and also /usr/local/nagios/share/
>directory are readable by whatever username your apache process is running
>under (usually either 'apache' or 'nobody').
>
>Check the contents of the htaccess file to make sure the user was created
>properly.  You should see one line per user, followed by a bunch of random
>characters on that line (the hashed password).  Usernames and passwords are
>case-sensitive.
>
>Finally, check your apache error logs for clues where the authentication
>went wrong.  The message "403 Forbidden - You don't have permission to
>access /nagios/ on this server" is produced by apache, not Nagios.
>
>
>"Anthony Gunia" <aggunia at comcast.net> wrote in message
>news:EFEGKJGHHACNJCDLNLKMIEADCEAA.aggunia at comcast.net...
>  
>
>>Hi all,
>>
>>I'm a newbie with Nagios.  I just read the O'Reilly docs on setting up
>>Nagios, and have it running.  However, I'm having a problem accessing
>>    
>>
>Nagios
>  
>
>>via a web browser at this point...I get the following:
>>
>>"You don't have permission to access /nagios/ on this server."
>>
>>I'm running Nagios on Red Hat 7.3/Apache 1.3.27.  I found the following on
>>the listserv from Sebastian, and applied his recommendations, but it still
>>does not work:
>>
>>"httpd.conf
>> ScriptAlias /nagios/cgi-bin/ /usr/local/nagios/sbin/
>> Alias /nagios/ /usr/local/nagios/share/
>> <Directory "/usr/local/nagios/share">
>> Options None
>> AuthName "NAGIOS ACCESS"
>> AuthType Basic
>> AuthUserFile /usr/local/nagios/etc/htpasswd.users
>> require valid-user
>> </Directory>
>>
>> now set up a user like this:
>> htpasswd -c /usr/local/nagios/etc/htpasswd.users -s username
>> this invokes the htpasswd programm and (-c) creates a new password file
>> where the password for user 'username' is stored as a (-s) SHA1 Hash
>> for a second user, just call htpasswd without the -c flag :)
>>
>> and don't create a htaccess file, since users might be able to look into
>> that file ...
>> this should work smoothly ;)"
>>
>>Any thought out there would be appreciated on getting the web access to
>>work.  Thanks!
>>
>>Anthony
>>aggunia at comcast.net
>>
>>
>>
>>-------------------------------------------------------
>>This SF.net email is sponsored by: SF.net Giveback Program.
>>Does SourceForge.net help you be more productive?  Does it
>>help you create better code?  SHARE THE LOVE, and help us help
>>YOU!  Click Here: http://sourceforge.net/donate/
>>_______________________________________________
>>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
>>
>>    
>>
>
>
>
>
>-------------------------------------------------------
>This SF.net email is sponsored by: SF.net Giveback Program.
>Does SourceForge.net help you be more productive?  Does it
>help you create better code?  SHARE THE LOVE, and help us help
>YOU!  Click Here: http://sourceforge.net/donate/
>_______________________________________________
>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
>
>  
>



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
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