config - Why do we need the <Directory> in Apache .conf file? -
simple question:
<virtualhost *:80> servername notes.example.com documentroot /var/www/notes <directory "/var/www/notes"> require granted options +indexes </directory> </virtualhost>
on first sight works putting:
<virtualhost *:80> servername notes.example.com documentroot /var/www/notes </virtualhost>
so why need <directory>
statement anyway?
i've found several examples on web of using <directory>
or <proxy>
thing , others putting settings under <virtualhost>
branch.
because can define particular parameters particular directories.
you
<directory "/var/www/notes/private"> options -indexes <directory>
or similar. documentroot
work itself, if want add directory options, you'll need use directory tag.
Comments
Post a Comment