大网数据广告活动
服务器运维问答

Self-signed certificate for haproxy causes chrome warning of insecure connection

· 52CE 我爱测

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 ce…

问题原文

原帖链接 · zuba · CC BY-SA 3.0

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 127.0.0.1:8080 check
    server  app2 127.0.0.1:8081 check

How can I manage this warning?

已采纳解答

原帖链接 · d3ag0s · CC BY-SA 3.0

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.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-03-29)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。