我有 2 个带 SSL 的 tomcat7 实例(在 2 个单独的虚拟机上),我想使用 haproxy 作为它们的负载平衡器。
我不确定具体如何执行此操作,但我尝试使用打开的 ssl 安装 haproxy 1.5(并使用 USE_OPENSSL=yes
编译)并使用与此处类似的配置:http://virtuallyhyper.com/2013/05/configure-haproxy-to-load-balance-sites-with-ssl/
frontend https_frontend
bind *:443 ssl crt /etc/haproxy/keystore
mode http
option httpclose
option forwardfor
reqadd X-Forwarded-Proto:\ https
default_backend web_server
backend web_server
mode http
balance roundrobin
cookie SERVERID insert indirect nocache
server s1 vm1:8443 check cookie s1
server s2 vm2:8443 check cookie s2
启动 haproxy 时出现以下错误:
'bind' only supports the 'transparent', 'defer-accept', 'name', 'id', 'mss' and 'interface' options.
有人有什么建议/想法吗? 谢谢! :)
最佳答案
您还没有编译支持 SSL 的 HAProxy。 请在构建 HAProxy 时添加 USE_OPENSSL=1。请注意,它需要安装 libssl-dev 包。
巴蒂斯特
关于tomcat - HAProxy 负载均衡与 tomcat SSL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20843301/