<VirtualHost *:80>
RewriteEngine On
WSGIPassAuthorization on
# Block access for all IPs in /etc/apache2/ipblacklist.conf
RewriteMap hosts-deny "txt:/etc/apache2/ipblacklist.conf"
RewriteCond "${hosts-deny:%{REMOTE_ADDR}|NOT-FOUND}" "!=NOT-FOUND" [OR]
RewriteCond "${hosts-deny:%{REMOTE_HOST}|NOT-FOUND}" "!=NOT-FOUND"
RewriteRule "^" "-" [F]
# Maintenance mode section
# Allow Individual IP stored in /etc/apache2/maintenance.exceptions addresses past maintenance page
RewriteMap exceptions /etc/apache2/maintenance.exceptions
RewriteCond ${exceptions:%{REMOTE_ADDR}} =OK
RewriteRule ^ - [L]
ErrorDocument 503 /static/html/maintenance/under_construction.html
RewriteCond /etc/apache2/MAINTENANCE_ON -f
RewriteCond expr "! %{REQUEST_URI} -strmatch '/static/html/maintenance/*'"
# Allow access for LB IPs
RewriteRule ^ - [R=503,L]
RewriteCond /etc/apache2/MAINTENANCE_ON !-f
RewriteRule ^/static/html/under_construction.html$ / [R,L]
# BLOG Conf - Test
ProxyPreserveHost On
ProxyRequests Off
Alias /503 /home/redacted/redacted/redacted/static/html/under_construction.html
<Location /mag>
ProxyPass http://192.168.1.225/mag
ProxyPassReverse http://192.168.1.225/mag