Skip to content

Instantly share code, notes, and snippets.

@karthiks
Created July 21, 2021 18:02
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/b866ac45d351195906f1e96b605898a9 to your computer and use it in GitHub Desktop.
Save karthiks/b866ac45d351195906f1e96b605898a9 to your computer and use it in GitHub Desktop.
Apache configuration file for the default website
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
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]
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment