[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 [...]
....
</Directory>
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
</Files>
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:
>/www/timesfour/cgi-bin
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
></Limit>
>-------------------------
>In /www/timesfour/memberss/ I've placed the ".htpasswd" file:
>I've also tried: /home/timesfour/memberss
>/home/www/timesfour/memberss/
>/www/home/timesfour/memberss/
Oops looks like you tried that. Ask your provider to confirm the exact
paths for you.
>-------------------------
>Hugh:iS4z1yQWXQ2dx
>admin:gjHkKzX5WI4yE
>-------------------------
>
>Now when I try to access:
>http://216.36.200.111/memberss/ I get a 500 "Internal Server Error"
>http://216.36.200.111/memberss/index.html 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
http://www.oven.com/
More information about the thelist
mailing list