@rakesh wrote:
Hello there.
I am using Haproxy as frontend loadbalancer, version: 1.5.4 2014/09/02
Backend is on the same server, an apache:8080 running on Centos6.Now I am trying to migrate this website to https using letsencrypt.
I have installed the certs through Certbot.
Then concatenated fullchain.pem and privkey.pem and placed it in /etc/haproxy dir as instructed on certbot and various other sites.
I have not yet setup the renew, as I want to test this out first. I hope that’s fine.So all that appears to go fine.
However when I try to browse the website, following happens:
The web-app’s login page redirect to https OK, but when I enter user credential and do submit, the url redirects to
https://<domain>:80
and it throws error ERR_SSL_PROTOCOL_ERROR and on the server sideOn the server, I see below in haproxy log:
http http/<NOSRV> -1/-1/-1/-1/0 400 187 - - PR-- 2/0/0/0/0 0/0 "<BADREQ>"
Appreciate any direction on this.
Here is my haproxy.cfg file.
global tune.ssl.default-dh-param 2048 defaults mode http option http-server-close option forwardfor frontend http bind *:80 reqadd X-Forwarded-Proto:\ http default_backend app frontend https bind *:443 ssl crt /etc/haproxy/certs/<domain>.pem reqadd X-Forwarded-Proto:\ https default_backend app backend app redirect scheme https if !{ ssl_fc } server apache 127.0.0.1:8080 maxconn 50 check
Posts: 4
Participants: 2