Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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

share|improve this question

1 Answer 1

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.

share|improve this answer
    
PS: Be sure to reload Apache after you update the files. –  JClaspill May 29 '13 at 3:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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