janeczku / haproxy-acme-validation-plugin

:four_leaf_clover: Zero-downtime ACME / Let's Encrypt certificate issuing for HAProxy
MIT License
291 stars 50 forks source link

No SSL enforce #17

Closed cmonty14 closed 6 years ago

cmonty14 commented 6 years ago

Hi,

I have configured HAProxy like this: `frontend http bind *:80 mode http

Set X-SSL in case of ssl_fc

http-request set-header X-SSL %[ssl_fc]
# Adds http header to end of the HTTP request
reqadd X-Forwarded-Proto:\ http
# Test URI to see if its a letsencrypt request
acl url_acme_http01 path_beg /.well-known/acme-challenge/
http-request use-service lua.acme-http01 if METH_GET url_acme_http01
default_backend default

`

However, I cannot access any service on port 80 because it is entended that https will be enforced. Instead I get a 503 error.

My previous configuration was different: `frontend public

Listen on port 80

bind *:80
# Set X-SSL in case of ssl_fc
http-request set-header X-SSL %[ssl_fc]
# Adds http header to end of the HTTP request
reqadd X-Forwarded-Proto:\ http
#default_backend default

`

cmonty14 commented 6 years ago

Solved. Only 1 frontend section.