We are trying to configure ha proxy to act as reverse proxy for a SSL/TLS Pass-Through design and now we are getting below error when trying to access the site.
502 Bad Gateway
The server returned an invalid or incomplete response.
Looks like a certificate issue but how do I fix this ? when I am running a openssl s_client command, I am getting the message
verify error:num=19:self signed certificate in certificate chain
I also tried running the curl command and the output is as attached. can anyone please help ?
If you didn’t pay money for the certificate, and you didn’t setup a let’s encrypt verification, you don’t have a valid cert. You are also talking about SSL pass-through, so I don’t know what you would like to do, and I also do not know what you have actually configured.
We pay for the cert and I have the cert with me. We also created a .pem file from the cert and uploaded to /usr/share/ssl/certs/ and at /usr/local/share/ca-certificates/ . here’s my config file
global
maxconn 4096
user HRIS_HAProxy
group HRIS_HAProxy
daemon
So, now you need to decide what you would like to do with haproxy.
Would you like to forward port 443 to the sharepoint server, and let the sharepointserver handle SSL/HTTPS? So Haproxy does not intervene and just forwards?
Or do you want to intercept SSL on haproxy and forward HTTP to the sharepointserver?
Your configuration is wrong either way:
there is no mode https as you declared in the defaults section
you have mode http in the frontend but mode tcp in the backend. Use mode tcp everywhere (or just put it in the default section) to pass-through SSL
Ok, so I corrected that. Changed mode to http in default and changed to tcp in frontend and backend. Still the site doesnt work… same 502 bad gateway… anything I am still missing ? Sorry I am just new HA proxy and linux altogether…