[nylug-talk] Apache Authentication

Jonathan Hirschman jonathan at rightsprotect.com
Mon May 12 00:49:00 EDT 2003


I'd guess that you don't have AllowOverride set correctly.

Here's a section of the "default" httpd.conf that is configured 
correctly to allow .htaccess files to do their thing:


# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/home/www/data">

#
# This may also be "None", "All", or any combination of "Indexes",
# "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews".
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
     Options Indexes FollowSymLinks MultiViews

#
# This controls which options the .htaccess files in directories can
# override. Can also be "All", or any combination of "Options", "FileInfo",
# "AuthConfig", and "Limit"
#
    AllowOverride AuthConfig

# Controls who can get stuff from this server.
#
     Order allow,deny
     Allow from all
</Directory>

Make sure your docroot is set correctly, and change AllowOverride from 
None to AuthConfig.

I had exactly the same problem, and this cured it.

jonathan



jose sanchez wrote:
> Hello:
> 
> I am experiencing some problems authenticating users
> with apache. I have created the password file with
> htpasswd and the .htaccess file in the directory I
> want only authorized users to access.
> 
> This is my .htaccess file:
> 
> AuthType Basic
> AuthName "Statistics"
> AuthUserFile /usr/apache/users/kcmultiservices
> require valid-user
> 
> These are the compiled-in modules:
> 
> whmicro-www:/home/www/logs# /usr/apache/bin/httpd -l
> Compiled-in modules:
>   http_core.c
>   mod_env.c
>   mod_log_config.c
>   mod_mime.c
>   mod_negotiation.c
>   mod_status.c
>   mod_include.c
>   mod_autoindex.c
>   mod_dir.c
>   mod_cgi.c
>   mod_asis.c
>   mod_imap.c
>   mod_actions.c
>   mod_userdir.c
>   mod_alias.c
>   mod_access.c
>   mod_auth.c
>   mod_auth_digest.c
>   mod_so.c
>   mod_setenvif.c
> suexec: disabled; invalid wrapper
> /usr/apache/bin/suexec
> 
> Do I need to add the AddModule mod_auth.c or
> LoadModule mod_auth.c in order for the authentication
> to work or there's somthing wrong I'm doing?
> 
> Thanks in advance for your time. :)
> 
> 
> __________________________________
> Do you Yahoo!?
> The New Yahoo! Search - Faster. Easier. Bingo.
> http://search.yahoo.com
> _______________________________________________
> The nylug-talk mailing list is at nylug-talk at nylug.org
> To subscribe or unsubscribe: http://herzl.nylug.org/mailman/listinfo/nylug-talk




More information about the nylug-talk mailing list