I've created a public directory where people can upload files to and I'd like to disable any kind of file parsing in that directory, i.e. disable php file parsing, .htaccess, etc. The directory should only contain images and compressed archives.
I was wanting to use the RemoveHandler, but I'd like a simple way to disable all the security threats.
Currently I'm using this but I wonder if this is enough:
<Directory "/var/www/dir">
Options Indexes FollowSymlinks
AddHandler default-handler php pl py
AllowOverride None
</Directory>
just
instead of AddHandler should be more generic [ especially that probably your web server/mod-php will happily execute .php3 and .php5 files. maybe even .phtml ].
interestingly such syntax of SetHandler but apparently works for me [ found via: this one ]
i'd also change Directory into Location so it's not bound to some branch of your filesystem, but rather virtual directory in apache's url. - just in case..
you might also add
in case someone wanted to host circa '95 all-static webpage...