I try to setup SSL termination with haproxy as a test stand. It serves the test page on 80 port well, but on 443 port chrome shows a warning that ssl connection is not secure and the icon with https stricken through.

I created certificate with these commands:

openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout web.key -out web.crt
cat web.crt web.key > web.pem

with Common name defined as haproxy.com

Also I put haproxy.com to my /etc/hosts file

Here is the excerpt of haproxy:

frontend  main
    bind *:80
    bind *:443 ssl crt /root/web.pem
    mode http
    default_backend             app

backend app
    balance     roundrobin
    server  app1 check
    server  app2 check

How can I manage this warning?


A self-signed certificate is not trusted by any browser, as you are the one who signed the certificate and not a certificate authority. You can import the root certificate in the trust store of the browser, but this will only make your connection a trusted one, while others will receive the same warning message.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.