2

我已经安装了 HAPRoxy 1.5-dev19,我正在尝试使用 SSL 进行绑定。

我在 /etc/ssl/certs 密钥中生成了 openssl 证书,并验证它们在那里并且看起来不错,并更新了 haproxy.cfg 如下:

openssl req -nodes -x509 -newkey rsa:2048 -keyout /etc/ssl/certs/private.key -out /etc/ssl/certs/cert.pem -days 2000

前端 XRE 绑定 *:9045 ssl crt /etc/ssl/certs/private.key

但我仍然得到:

解析 [/etc/haproxy/haproxy.cfg:48]:'bind :443':无法从 PEM 文件 '/etc/ssl/certs/private.key' 加载 SSL 证书。

代理“haproxyLoopback”:在 [/etc/haproxy/haproxy.cfg:48] 处没有为绑定“:443”指定 SSL 证书(使用“crt”)。

感谢您的帮助,非常感谢,查理

4

1 回答 1

8

You are pointing the wrong file. It should be like this:

frontend XRE bind *:9045 ssl crt /etc/ssl/certs/cert.pem
于 2013-10-15T15:23:02.563 回答