Hello all,
I have a requirement to run two different applications on a host behind port 443. When requesting the FQDN of the system, the request needs to be forwarded unchanged to another port. On the other hand, if the alias is addressed, the request should be forwarded to my nginx using the HAproxy protocol.
Currently I use sniproxy for this purpose, which works reliably so far. I would like to switch to HAproxy, but I am overwhelmed by the number of configuration options. Can you help me to transfer the sniproxy configuration into a simple/basic haproxy one?
user root
pidfile /var/run/sniproxy.pid
listen 0.0.0.0 443 {
proto tcp
table hosts
access_log {
filename /var/log/sniproxy/access.log
priority debug
}
}
table hosts {
host.domain.foo 127.0.0.1:5665
alias.domain.foo 127.0.0.1:8443 proxy_protocol
}
Thanks!