I have https traffic coming into my network on port 443, now based on the subdomain of the query I need to send it to correct server on local network.
Any idea how to accomplish this?
If i have understood your question you should use acl. This is well documented!
Here is an example:
acl app1 hdr(host) -i subdomain2.domain.com
use_backend app1 if app1
acl app2 hdr(host) -i subdomain1.domain.com
use_backend app2 if app2
Are your terminating TLS on haproxy (as in, do you install certificate and private key on haproxy) or are you just trying to forward encrypted traffic to different backend HTTPS server, based on the hostname/SNI?
I am trying to forward an encrypted traffic to other https servers based on the subdomain the traffic was sent to.
Thank you !!!
This seems to work.
One more question how do I log what rules get matched ?
At the moment I only get :
haproxy: Connect from 126.96.36.199:22625 to 192.168.199.3:443 (https-in/TCP)