3

I am setting up an apache server on my linux (debian) machine.

I am making a website, with sub directories that contains my css and image file.

Here is my config.

<Directory /var/www/*>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride none
    Order allow,deny
    Allow from all
</Directory>

Is that configuration correct for access to sub directory

3

You don't need the asterisk(*) after www.

<Directory /var/www/>
    Options -Indexes FollowSymLinks MultiViews
    AllowOverride none
    Order allow,deny
    Allow from all
</Directory>

I'm not a huge fan of allowing indexes, so I disabled those and removed the asterisks. The above will deny indexes and grant allow access to any sub-directory of /var/www.

1
  • PS: Be sure to reload Apache after you update the files. – JClaspill May 29 '13 at 3:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.