httpd:where should the .htaccess file be?

Issues related to applications and software problems
Post Reply
jinzishuai
Posts: 1
Joined: 2011/09/23 16:08:53

httpd:where should the .htaccess file be?

Post by jinzishuai » 2011/09/23 16:14:34

Hi there,

I am trying to set up a reverse proxy using apache (httpd) on CentOS-6.
I am using the default httpd configuration so
[code]DocumentRoot "/var/www/html"[/code]
However, it turned out by my test that I have to put my .htaccess file under /var/www in order to have the reverse proxy working.
If it is instead placed under /var/www/html, the reverse proxy does not work.
But shouldn't I put it under the DocumentRoot?
Thanks a lot.

Shi

adm1n
Posts: 4
Joined: 2011/09/28 03:40:12
Contact:

Re: httpd:where should the .htaccess file be?

Post by adm1n » 2011/09/28 07:03:36

It must be placed inside your documentroot.
AllowOverRide must be changed from None to All in the httpd.conf file for .htaccess to work.

Thanks,

Post Reply