View Single Post
  #10  
Old 03-07-2011, 03:47 PM
aledesma aledesma is offline
New Member
 
Join Date: Mar 2011
Posts: 3
Lightbulb Reading .htaccess from parent directory, above child VirtualHost's DocumentRoot

Quote:
Originally Posted by mistwang View Post
I think it has been supported already. If you find that it does not work properly, let us know.
The issue, as I am seeing it right now, is that the VirtualHost is not honoring the .htaccess in the parent directory (which is a different VirtualHost) as cPanel created the directory hierarchy.

Are these separated in the performance (or security) model, to not walk the directory tree up to the DocumentRoot for parent .htaccess files?

eg:

Code:
<VirtualHost 192.168.0.1>
 ServerName example.com
 DocumentRoot /var/www/example.com/htdocs
</VirtualHost>
Code:
<VirtualHost 192.168.0.1>
 ServerName test.example.com
 DocumentRoot /var/www/example.com/htdocs/test
</VirtualHost>
Will test.example.com ever read the .htaccess from /var/www/example.com/htdocs, or will it start at /var/www/example.com/htdocs/test? I can completely understand the reasoning behind starting at /var/www/example.com/htdocs/test for performance or even for security, but I am not sure if that fits in with the Apache methods that are expected (where every directory from / on up to the cwd are checked for an .htaccess).

An optional flag in Server->General->HT Access for "Apache style inherit" with a warning that it could impact performance would be nice to see.
Reply With Quote