I need help to configure haproxy to do simple task in Apache:

####
# Cert is selfsigned
SSLProxyMachineCertificateFile /home/ubuntu/generic_cert.pem
<Location /service1/>
        Proxypass "https://10.0.0.1:8550/serviceA/";
        ProxyPassReverse "https://10.0.0.1:8550/serviceA/";
</Location>
#####

I try:
######
frontend http-in
     bind *:80
     acl www_site hdr_beg(host) -i www.example.com
     acl url_service1           path_beg -i /service1
     use_backend test_a         if www_site url_service1

backend test_a 
      option httpchk
      http-request set-header Host 10.0.0.1
      reqrep ^([^\ ]*)\ /service1(.*) \1\ /serviceA\2
      rspirep ^(Location:)\ https://([^/]*)/(.*)$    \1\
http://\2/service1/\3
      server one 10.0.0.1:8550

The problem: The site displays "Bad Gateway"
######

Thanks in advance.

Reply via email to