Apache .htaccess error
Hey, i just copied a .htaccess file to a folder from my apache, and when i try to acces it i get an internal server error.
Wed Jun 04 11:11:35 2008] [alert] [client ip] /home/test/.htaccess: AllowOverride not allowed here .htaccess Quote:
Should i post my httpd.conf? |
The AllowOverride is available only in a <Directory...>...</Directory> section. If you want to restrict access in a directory using .htaccess, then you must put:
Code:
AllowOverride AuthConfig |
So change .htaccess to this?
Quote:
|
hmm it dont work, now it says:
[Wed Jun 04 12:01:18 2008] [error] [test 10.20.1.28] Directory index forbidden by rule: /home/ |
You didn't understand what I've told you.
If you want to restrict access to a directory (i.e. /home/test) by asking username/password, then you have to put .htaccess in that directory. The .htaccess should contain: Code:
AuthType Basic In httpd.conf you should add (or edit if it exists) the following section: Code:
<Directory /home/test> |
ow, yeah if i put it in httpd.conf it allways work, but i have to do 380 folders, so i want to use .htaccess files to prevent anything changing in httpd.conf.
|
What exactly do you want to do with .htaccess? You can put the AllowOverride directive in the main <Directory ..>section and then use .htaccess on a per directory basis
|
So only the user from active directory which has acces to that specific folder gets to see the contents of that folder with apache. So i dont know for sure how to set my httpd.conf up, the authentication part works just fine. But the reading of .htaccess files is another thing. I have set up a folder with a .htaccess but it says AllowOverride not allowed here.
|
All times are GMT -5. The time now is 01:31 AM. |