123456789101112131415161718192021 |
- # custom apache configuration rules
- # dontlog flag is optional; determines whether or not this visit is recorded to apache's logs
- <Location />
- # deny access to useless bots
- SetEnvIfNoCase User-Agent "^Wget" bad_bot dontlog
- SetEnvIfNoCase User-Agent "^archive.org_bot" bad_bot dontlog
- Deny from env=bad_bot # 403/forbidden (request blocked)
- # deny attempts to access via the server's ip address to all virtual hosts; ie. http://127.0.0.1/phpmyadmin
- SetEnvIf Host ^[0-9] no_ip dontlog
-
- # since we cannot use conditions for env, set a rule immediately after to whitelist a specific
- # numerically-prefixed subdomain (based on hostname) hosted on this server
- SetEnvIf Host 4widgets\.widgets\.ext whitelist
-
- Deny from env=no_ip # 403/forbidden (request blocked)
- Allow from env=whitelist # 200/ok (allowed access)
- </Location>
|