Skip to content

Instantly share code, notes, and snippets.

@karthiks
Created July 21, 2021 17:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save karthiks/da9cfa8b310d5a60b20c7d3d02a14e82 to your computer and use it in GitHub Desktop.
Save karthiks/da9cfa8b310d5a60b20c7d3d02a14e82 to your computer and use it in GitHub Desktop.
Select part of Apache configuration file for the default website
RewriteEngine on
RewriteMap hosts-deny "txt:/etc/apache2/blacklist"
RewriteCond "${hosts-deny:%{REMOTE_ADDR}|NOT-FOUND}" "!=NOT-FOUND" [OR]
RewriteCond "${hosts-deny:%{REMOTE_HOST}|NOT-FOUND}" "!=NOT-FOUND"
RewriteRule .* - [F]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment