HAProxy redirect HTTPS if SSL-certificate is available

Viewed 644

I would like to force TSL/SSL/HTTPS if HAProxy has a certificate available for the provided domain. I could just provide a list with domain names, but I would rather have it dynamically so that I do not have to update it over and over again.

This is my current configuration:

frontend public
    acl             has_ssl hdr(host) -i one.nl two.be three.be four.nl five.nl six.com seven.com eight.net nine.com ten.org

    use_backend     www-https if has_ssl
    default_backend www

backend www-https
    redirect scheme https if !{ ssl_fc }

Is there a system variable or something to check if a certificate for the domain name is available?

0 Answers
Related