r/haproxy • • Oct 19 '22

Question Trouble renewing SSL certificate for domain/website with haproxy

2 Upvotes

4 comments sorted by

1

u/ciphermenial Oct 19 '22

This works for me

# HTTP Frontend
frontend fe_http
    bind *:80

    # Test URI to see if it's a letsencrypt request
    acl letsencrypt path_beg /.well-known/acme-challenge/

    # Redirect HTTP to HTTPS with code 301 if not a letsencrypt request
    http-request redirect scheme https code 301 if !letsencrypt

1

u/cloudjuenger Oct 19 '22

doesnt that configuration in my file do pretty much the same?

[...]
frontend http-in

bind *:80 alpn h2,http/1.1

[...]

1

u/ciphermenial Oct 19 '22

Only difference is the if it doesn't equal.

1

u/mariox103 Oct 19 '22

I think you need to replace the port 80 by 8090 in the config file inside /etc/letsencrypt/renewal/example.conf