我按照https://www.digitalocean.com/community/tutorials/how-to-implement-ssl-termination-with-haproxy-on-ubuntu-14-04的说明设置haproxy来收听ssl。
然而,当我尝试通过https点击任何请求时,它似乎没有工作,我基本上得到一个ERR_CONNECTION_REFUSED。
我通过将所有操作输出到nohup来启动haproxy。我试着调查nohup,当我点击请求时,我似乎没有得到任何信息。
基本上这是我添加的配置:
frontend https
bind *:443 ssl crt /etc/ssl/private/{domainname.com}.pem
reqadd X-Forwarded-Proto:\ https
default_backend default
在生成证书时,我也拥有相同的domainname.com。
有没有其他方法可以找出它似乎无法正常工作的原因。
答案 0 :(得分:1)
您可以使用" openssl"验证证书响应:
echo | openssl s_client -showcerts -connect yourdomain:443
或尝试" curl":
curl -v -o /dev/null https://yourdomain
检查您的haproxy日志记录是否已启用且正确,例如:
global
log 127.0.0.1 local0
defaults
log global