經過大量的谷歌搜索,我終於使我的haproxy ssl工作。但現在我得到了問題,因爲根和中間證書沒有安裝,所以我的ssl沒有綠色條。Haproxy ssl配置 - 安裝根證書和中間證書
我HAProxy的配置
global
maxconn 4096
nbproc 1
#debug
daemon
log 127.0.0.1 local0
defaults
mode http
option httplog
log global
timeout connect 5000ms
timeout client 50000ms
timeout server 50000ms
frontend unsecured
bind 192.168.0.1:80
timeout client 86400000
reqadd X-Forwarded-Proto:\ http
default_backend www_backend
frontend secured
mode http
bind 192.168.0.1:443 ssl crt /etc/haproxy/cert.pem
reqadd X-Forwarded-Proto:\ https
default_backend www_backend
backend www_backend
mode http
balance roundrobin
#cookie SERVERID insert indirect nocache
#option forwardfor
server server1 192.168.0.2:80 weight 1 maxconn 1024 check
server server2 192.168.0.2:80 weight 1 maxconn 1024 check
192.168.0.1是我的負載平衡器IP。 /etc/haproxy/cert.pem包含私鑰和域證書,例如。 www.domain.com
有another question with ssl configuration,其中包括bundle.crt。當我聯繫我的SSL支持時,他們告訴我我需要安裝根證書和中級證書。
從Comodo Documentation,創建捆綁包很簡單,因爲合併他們的crt,我做了。
但是當我試圖重新配置我的HAProxy的配置爲
,我不能使用的配置參數上綁定bind 192.168.0.1:443 ssl crt /etc/haproxy/cert.pem ca-file /path/to/bundle.crt
即時得到錯誤。
p.s im使用1.5 dev12版本。隨着最新版本dev17我有問題,甚至開始HAProxy的as on this post
你應該[關閉的SSLv3(HTTP:/ /blog.haproxy.com/2014/10/15/haproxy-and-sslv3-poodle-vulnerability/)with bind 192.168.0.1:443 ssl crt /etc/haproxy/cert.pem ca-file/path/to/bundle.crt no-sslv3' – 2016-12-15 11:57:28