2 Apache wpadmin
tengel edited this page 2024-09-05 07:43:21 -05:00

When using multiple webservers in a load balancer, it's common that one node will be the "admin" node that is preferred for edits. Maybe it's writing to the Master in a MySQL multi-slave or MMM config, (r)syncing it's disk out to all the other nodes, puppetmaster/chef admin node, etc.

Using a simple Apache reverse proxy on all the nodes except the admin node can be handy, for instance in a Wordpress setup.

# 192.168.3.3 = admin node private IP
ProxyRequests Off
ProxyPreserveHost Off
ProxyVia Off
<Location "/wp-login.php">
  Header set "Host" "www.myblog.com"
  ProxyPass http://192.168.3.3/wp-login.php
  ProxyPassReverse http://192.168.3.3/wp-login.php
</Location>
<Location "/wp-admin">
  Header set "Host" "www.myblog.com"
  ProxyPass http://192.168.3.3/wp-admin
  ProxyPassReverse http://192.168.3.3/wp-admin
</Location>