Skip to content

Instantly share code, notes, and snippets.

@gdugas
Last active December 25, 2015 11:59
Show Gist options
  • Save gdugas/6973185 to your computer and use it in GitHub Desktop.
Save gdugas/6973185 to your computer and use it in GitHub Desktop.
#! /bin/sh
vhosts=/var/www/vhosts
for d in `ls -1 $vhosts`; do
echo "<Directory $vhosts/$d/httpdocs/images>"
echo " AllowOverride None"
echo "</Directory>"
done
echo "<LocationMatch \"images/.+\.php\">"
echo " Order allow,deny"
echo " Deny from all"
echo "</LocationMatch>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment