How to avoid apache allow download certain files? (for example .py and .sh)
I want to avoid files to be served and downloaded like
www.site.com/file.sh
www.site.com/file.py
but I've tried to do this
<Files ~ "^\.sh">
Order deny,allow
deny from all
</Files>
<Files ~ "^\.py">
Order deny,allow
deny from all
</Files>
also this
<FilesMatch "\.(sh|py)$">
Order deny,allow
deny from all
</FilesMatch>
Nothings seems to work, I've tried to put the file in
/etc/apache2/apache2.conf
also
/etc/apache2/sites-available/default
Nothing works, apache still let me download the files.
.txt
extension.