[thelist] .htaccess/.htpasswd - how?

Seb Barre sebastien at oven.com
Tue Oct 24 08:46:37 CDT 2000

At 09:14 PM 10/23/2000 -0500, you wrote:

>I'm trying to use .htaccess and .htpasswd to control the
>users that can access a directory on a new server.  No
>matter what I try, I can't get it to work. Is it some error
>on my part or is it an issue of server-setup?

You should check with your provider to ensure that the server config 
includes the AuthConfig option in AllowOverride directive.

It would look something like this:

<Directory /home/*/public_html>
     AllowOverride FileInfo AuthConfig Limit [...]

If that directive isn't set properly, the server may choke on .htaccess 
files because you're not allowed to use them according to the server 
rules.  You can also remove the AuthGroupFile (instead of pointing to 
/dev/null), since it's not required.

And also (in case your provider is really brain dead - no offense, mistakes 
happen), check that they have:

AccessFileName .htaccess
<Files ~ "^\.ht">
     Order allow,deny
     Deny from all

in their config as well.

>Server provider says my home page is:  /www/timesfour/
>for example, they say the path to my cgi-bin directory is:

You may want to check that these are actual system paths, and not virtual 
URL paths for the server.  The /www/timesfour/ directory might not really 
exist on the server, and the AuthUserFile expects a system path (full or 
relative - you might try to remove the path to the .htpasswd file if it's 
in the same directory as the .htaccess file).

>In /www/timesfour/memberss/ I've placed the ".htaccess" file:
>AuthUserFile /www/timesfour/memberss/.htpasswd
>AuthGroupFile /dev/null
>AuthName TimesFour Members Area

Put the AuthName in quotes.  ie:

AuthName "TimesFour Members Area"

>AuthType Basic
><Limit GET POST>
>require valid-user
>In /www/timesfour/memberss/ I've placed the ".htpasswd" file:
>I've also tried: /home/timesfour/memberss

Oops looks like you tried that.   Ask your provider to confirm the exact 
paths for you.

>Now when I try to access:
>  I get a 500 "Internal Server Error"
>  does the same thing.

And finally, ask if you can get access to the error log file for your 
domain.  It will usually contain alot of useful info for debugging these 
kinds of problems.

--- -- -
Seb Barre - sebastien at oven.com
OVEN Digital Toronto
Work: 416-595-9750 x 222
Mobile: 416-254-5078

More information about the thelist mailing list