Apache applies configurations for directories to a request from smallest to largest. In essence the
<Directory /> section specifies virtual host defaults; since every other possible directory will have that portion in its path.
If multiple (non-regular expression) sections match the
directory (or one of its parents) containing a document, then the
directives are applied in the order of shortest match first,
interspersed with the directives from the .htaccess files. For
to the document /home/web/dir/doc.html the steps are:
- Apply directive AllowOverride None (disabling .htaccess files).
- Apply directive AllowOverride FileInfo (for directory /home).
- Apply any FileInfo directives in /home/.htaccess, /home/web/.htaccess and
/home/web/dir/.htaccess in that order.
BTW, in the above example
<Directory /home/web> would've worked the exact same way. The reason that isn't usually used though is because doing so will make moving your site to a new directory a little more difficult. It's easier to just use
<Directory /> since that will work no matter where the site root is.
There is a full explanation on the Apache site: http://httpd.apache.org/docs/current/mod/core.html#directory