haproxy Reverse proxy with ssl
Posted on 2014-10-21
For years i have been using haproxy on FreeBSD to do some reverse proxying. Up to this point i have never had to use SSL for two sites. Things changed and i now need them to be https.
I have gotten a working ssl certificate, but I am unable to to get haproxy to work with the sites.
here is the config i have been using:
timeout connect 5000ms
timeout client 50000ms
timeout server 50000ms
acl is_site1 hdr_end(host) -i server1.domain.com
acl is_site2 hdr_end(host) -i server2.domain.com
use_backend site1 if is_site1
use_backend site2 if is_site2
server s2 192.168.0.252:80 maxconn 32
server s1 192.168.0.246:80 maxconn 32
Any help would be appreciated.