Web Hosting Talk







View Full Version : .htaccess and protecting directories.


joubarani
07-01-2001, 08:12 AM
Hi,
We needed to protect one of our directories on cobalt server raq 4i, so we prepared the suitable .htaccess file and put it in the root directory but we have an error message "Internal Server Error".
What we have to do to fix this problem?
Thanks in advance,
:(

ffeingol
07-01-2001, 08:38 AM
I believe the default on RAQ's is to not allow .htaccess files. In your srm.conf (or possibly httpd.conf) you need to check the AllowOverride directive. I believe it wll be "none" and you need to change it to at lease "limit".

Frank

jtan15
07-01-2001, 10:00 AM
If what Frank said isn't the problem, make sure the .htaccess file is chmod 644, and is owned by the same user who owns the parent directory. For example, here is a directory on my server which shows my htaccess file:

drwxr-xr-x 6 vince users 4096 Jun 25 22:39 .
-rw-r--r-- 1 vince users 141 Apr 2 22:01 .htaccess

The htaccess file cannot be owned by root and chmod 600, or else it won't be readable!

Eagle
07-01-2001, 11:24 AM
No sorry, thats not it ffeingol is actually right...
edit the following in access.conf


change
<Directory /home/sites/*/>
Options -FollowSymLinks +SymLinksIfOwnerMatch
AllowOverride none
</Directory>

to
<Directory /home/sites/*/>
Options -FollowSymLinks +SymLinksIfOwnerMatch
AllowOverride All
</Directory>

Chicken
07-01-2001, 12:50 PM
Usually you would want to change this line here:
http://www.webhostingtalk.com/showthread.php?&postid=89301#post89301

(partial httpd.conf file posted, see bold part near bottom)

-this is one possible reason, though not the only one. I'd personally check this first.