I’ve never used HAProxy before - anyone have any tips on how I can add this to my Virtualmin powered server?
I’d like HAProxy to divert traffic for a specific domain to another port (docker container), but everything else to the normal Apache/Virtualmin setup.
Is this possible? Would it cause any issues to my Virtualmin setup or sites?
But for some reason, none of my virtualmin sites work (the Docker site works fine).
I have also played with the HAproxy config, switching the default_backend from loading my apache sites, to the docker site - it works for the docker site but not apache sites so the ‘default_backend’ definitely works (I commented out all other lines).
Here is my HAproxy config:
global
# to have these messages end up in /var/log/haproxy.log you will
# need to:
#
# 1) configure syslog to accept network log events. This is done
# by adding the '-r' option to the SYSLOGD_OPTIONS in
# /etc/sysconfig/syslog
#
# 2) configure local2 events to go to the /var/log/haproxy.log
# file. A line like the following can be added to
# /etc/sysconfig/syslog
#
# local2.* /var/log/haproxy.log
#
log 127.0.0.1 local2
# chroot /var/lib/haproxy
pidfile /var/run/haproxy.pid
maxconn 4000
user haproxy
group haproxy
daemon
# turn on stats unix socket
stats socket /var/lib/haproxy/stats