Is there a best practice to install HAproxy on a virtualmin managed server?
I know there isn’t an HAproxy webmin module to do the job, but maybe some experience / trick / advise could be helpful. Thx
I tend to discourage gratuitous use of proxies, but if you know what you’re doing and you know you need a proxy, there’s nothing particularly different about deploying one with Virtualmin or without. We’re just configuring Apache or nginx in a very common way. Putting a proxy in from of it is no different than any other Apache or nginx deployment.
Just make sure that if you’re doing anything weird with routes or whatever that requests to .well-known are answered by the web server and don’t get redirected or whatever. This is needed for Let’s Encrypt validation to work. This is also not unique to Virtualmin. But, it’s a thing to be aware of.
Thx. I need to have a load balancer in front of two servers with same website app, with session persistence on the HAProxy side of the thing. Any advice in such a situation?
Yes, one HAProxy load balancer as frontend and a backend with two servers (that can scale up) with the web application. Webmin seems to be a good management panel, that’s why I want to use it not only for backend side of the group, but also for frontend part.
Since there is no HAProxy module, I’d say maybe Webmin would be enough. I don’t see what Virtualmin offers other than overhead.
Really, I can only think of updates and maybe backups that would be handled. Mostly automatic updates would be safe enough on a system like this and backup scripts aren’t hard.
But, your system, your reasons. I’d say the less complex/overhead the better on this one.
Yeah, I can’t think of what Virtualmin would do for you in this circumstance. The proxy server has nothing for Virtualmin to manage. If you want it to automatically get configured when you add a new domain in Virtualmin, you could make a post-change script in Virtualmin to copy a new config over to the proxy server, but that would only be worth the time if you’ll be doing it more than a few times in the future.