I have haproxy installed and it works just fine, currently I have configuration that looks as follows
frontend public_http # Listen on port 80 bind *:80 mode http # Define ACLs for each domain acl acl_webtest hdr(host) -i -f /etc/haproxy/acls/webtest use_backend back_web_test if acl_webtest backend back_web_test mode http balance roundrobin # Load Balancing algorithm option httpchk option forwardfor server webtest 192.168.0.123:80 weight 1 maxconn 512 check
As you can see I am redirecting incoming HTTP traffic to the backend on the same port (80 default for HTTP).
But my question :
Is it possible to have single frontnend without bunch of
bind *:<port> statements and redirect to a single backend to the same
<port>. BUT only HTTP traffic. I know that default port for HTTP is 80, but we are able to send HTTP request to any port.
It looks like TCP proxy, but I need to redirect to a backend based on domain, and TCP layer (OSI 4) doesn't know anything about domain.
So I hope, I've described my problem clearly.
I would be grateful for any help.