Improved Proxy Feature

SYSTEM INFORMATION
OS type and version Debian 12
Webmin version 2.520
Virtualmin version 7.50.0 Pro
Webserver version Apache/2.4.65
Related packages mod_proxy_balancer

I’ve reviewed the documentation regarding “create-proxy”, “modify-proxy” and “delete-proxy” or in the GUI “Website Configuration > Proxy Paths” respectively.

Something that seems missing, and perhaps could be added to enhance the proxy feature would be a few directives.

ProxyPreserveHost which allows you to preserve the hostname being requested from the origin server to the backend server.

BalanceMember with status=+H which allows you to designate a member as a “hot standby”, useful as a failover method.

<Proxy balancer://myproxy>
BalancerMember http://primary.hostname.com:8080/
BalancerMember http://backup.hostname.com:8080/ status=+H
</Proxy>

This would cause as I understand traffic to be sent to primary.hostname.com:8080 by default, and backup.hostname.com:8080 if primary fails.

A more elaborate option could also look like:

<Proxy balancer://myproxy>
BalancerMember http://primary.hostname.com:8080/
BalancerMember http://secondary.hostname.com:8080/
BalancerMember http://backup.hostname.com:8080/ status=+H
</Proxy>

The above version would “round-robin” between “primary” and “secondary” then fallback to “backup” if primary or secondary fail.

This feature would require “mod_proxy_balancer” to be enabled on the server.

Thoughts?

1 Like

@Jamie, I agree with Peter, having a checkbox in the UI and a flag in the CLI would work. We could even make it a default without an option at all, because for most modern web apps behind a reverse proxy, turning it On is either required or at least harmless.

1 Like