search by tags

for the user

adventures into the land of the command line

apache blacklisting

..or whitelisting sometimes in your apache access_log, you can see funny access attempts, or you just want to lock down access within your team or company somewhere in your apache vhost’s config

<Directory "/var/www/html/">
#
# Controls who can get stuff from this server.
#
 Order allow,deny
 Allow from all
 Deny from 10.1.2.3
 Deny from 123.45.67.89
</Directory>

swap the wordings to whitelist ips and block everyone

<Directory "/var/www/html/">
#
# Controls who can get stuff from this server.
#
 Order deny,allow
 Deny from all
 Allow from 10.1.2.3
 Allow from 123.45.67.89
</Directory>

apache needs to be restarted or the config reloaded before any changes can take effect