문제

I have 2 tomcat7 instances (on 2 separate VMs) with SSL, and I want to use haproxy as a load balancer for them. I'm unsure exactly how to do this, but I tried installing haproxy 1.5 with open ssl (and compiled with USE_OPENSSL=yes) and used a similar configuration to here: 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

I get the following error when starting haproxy:

'bind' only supports the 'transparent', 'defer-accept', 'name', 'id', 'mss' and 'interface' options.

Does anyone have any suggestions/ideas? Thanks! :)

도움이 되었습니까?

해결책

You have not compiled HAProxy with SSL support. Please add USE_OPENSSL=1 when building HAProxy. Note that it requires libssl-dev package to be installed.

Baptiste

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top