I have tried reading the manual although to be honest I am still finding it hard to understand and get my head around what the Order/Allow actually does and what should be the default settings for web server.
I have the following default config, where I have turned off .htaccess and symbolic links.
Although I am not really sure what the Order Allow,Deny
and Allow from all
actually does? Should I change this to Allow from 127.0.0.1?
<Directory />
Options -Indexes -FollowSymLinks MultiViews
AllowOverride None
Order Allow,Deny
Allow from all
</Directory>
Additionally do I need the below <Files>
or is there a better way of writing this for apache?
<Directory /var/www/example/subdomains/dev/public/webapp>
RewriteEngine Off
<Files *>
order allow,deny
deny from all
</Files>
<FilesMatch "\.(png|gif|jpe?g|png|css|js|swf|ps|flv)$">
order allow,deny
allow from all
</FilesMatch>
</Directory>
Order Allow,Deny
means that theAllow
rules are processed before theDeny
rules. If client doesn't match theAllow
rules or it does match theDeny
rule, it will be denied access.So,
means that any client can access to your web server.
You already did that with
AllowOverride None
andOptions -FollowSymLinks
This config did the following:
webapp
folder except for images, js, swf, ...Pay attention to:
it tells Apache to deny any access.