apache vhost option and limit settings
I read the things at Apache but still am not sure I am doing this right. It compiles no syntax errors but how do you setthe <Directory> options structure to allow:
a) read only directories - no indexes allowed)
b) execute only directories - no reading or indexing
c) read and write directories (for storing user data) - no indexing
I know it has to do with ExecCGI, GET, POST etc. but am not sure which is which with all the <LIMIT> this and that etc.
Here is what I used and as one community leader suggested, it is a bit complicated, especially since this REPEATS 20 times for each hosted domain:
#<VirtualHost _default_:*>
# ServerName bigdrivehosting.com
# ServerAlias bigdrivehosting.com *.bigdrivehosting.com
# DocumentRoot c:/hosting/bigdrivehosting.com/web
# DirectoryIndex index.html index.htm index.shtml index.html.var
# Options Includes MultiViews IncludesNoExec FollowSymLinks
# ScriptAlias /cgi-bin/ c:/hosting/bigdrivehosting.com/web/userscripts/
# ScriptAlias /userscripts/ c:/hosting/bigdrivehosting.com/web/userscripts/
# <Directory "c:/hosting/bigdrivehosting.com/web">
# <Limit GET POST OPTIONS PROPFIND>
# Order allow,deny
# Allow from all
# </Limit>
# <LimitExcept GET POST OPTIONS PROPFIND>
# Order deny,allow
# Deny from all
# </LimitExcept>
# </Directory>
# <Directory "c:/hosting/bigdrivehosting.com/web/data">
# <Limit GET POST OPTIONS PROPFIND>
# Order allow,deny
# Allow from all
# </Limit>
# <LimitExcept GET POST OPTIONS>
# Order deny,allow
# Deny from all
# </LimitExcept>
# </Directory>
# <Directory "c:/hosting/bigdrivehosting.com/web/userscripts">
# AllowOverride Options
# Options +ExecCGI -IncludesNoExec
# </Directory>
#</VirtualHost>
This example is for the default but every other domain uses it.