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

Popular posts from this blog

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

java - Could not locate OpenAL library -

sorting - opencl Bitonic sort with 64 bits keys -