HAProxy community

Forwarding VMware ESXi 6.7.0 with HAProxy

#1

Hi There,
I am currently stuck with trying to forward a subdomain to ESXi.
I have changed the mode to TCP as the Web GUI already has a SSL Cert.

Here is my relevant conf:
frontend http_front
bind *:80
mode tcp
default_backend http_esxi

acl esxi_acl hdr_beg(host) -m beg sub1.domain.com
use_backend http_esxi if esxi_acl

backend http_esxi
mode tcp
server exsi 10.20.30.40:443 weight 1 maxconn 10240 check

Here is the error message I am getting:
“# 502 Bad Gateway
The server returned an invalid or incomplete response.”

I have read the previous thread “Forwarding VMWare workstation ports with HAProxy” and added what I thought was relevant conf, is there something obvious that I am missing?

I would appreciate any assistance with this.
Thanks Daniel

0 Likes

#2

I had many issues working with a colleague a while back trying to use HAProxy in front of vcenter, we did kind of get it working but to do so we copied what you see in this nginx config re-creating it in HAProxy.

I hope that helps.

0 Likes