haproxy 如何进行ssl https转发呢

西門扫雪 发布于 2013/07/29 16:55
阅读 6K+
收藏 0

haproxy 如何进行ssl https转发呢 apache+ssl 已经配置好了,haproxy怎么配置呢

global
    daemon
    nbproc 2 
    pidfile /usr/local/haproxy/haproxy.pid
    maxconn 100000

defaults
    #    log  global
    #    log 127.0.0.1 local5
    #    option dontlognull
    #    option httplog
    clitimeout 120000
    srvtimeout 3000000
    contimeout 30000
    retries 3
    mode http
    balance roundrobin   
    option abortonclose
    option tcpka
    option forwardfor
    option redispatch
    option http-server-close

frontend http_in
    bind *:80
    acl is_mr hdr_end(host) -i www.abc123_mr.com
    acl is_hdfs hdr_end(host) -i www.abc123_hdfs.com
    acl is_hbase hdr_end(host) -i www.abc123_hbase.com
    acl is_tongji hdr_end(host) -i www.abc123_tongji.com
    acl is_ganglia hdr_end(host) -i www.abc123_ganglia.com
    acl is_hue hdr_end(host) -i www.abc123_hue.com
    acl is_amap	path_beg	/appmaptile
    acl is_dfs path_beg       /dfs
    #acl is_logs path_beg        /logs

    use_backend mr_server if is_mr
    use_backend hdfs_server if is_hdfs
    use_backend hbase_server if is_hbase
    use_backend tongji_server if is_tongji
    use_backend ganglia_server if is_ganglia
    use_backend hue_server if is_hue
    use_backend amap_server if is_amap
    #use_backend log_server if is_logs
    use_backend dfs_server if is_dfs
    default_backend ganglia_server

backend mr_server
    server x.x.x.x_50030   x.x.x.x:50030      check weight 100 maxconn 1000

backend hdfs_server
    server x.x.x.x_50070	x.x.x.x:50070      check weight 100 maxconn 1000

# /mount/dfs
backend dfs_server
    server x.x.x.x_55555	x.x.x.x:55555        check weight 100 maxconn 1000

backend hbase_server
    server x.x.x.x_60010   x.x.x.x:60010      check weight 100 maxconn 1000

backend tongji_server
    server 1x.x.x.x_7772   x.x.x.x:7772      check weight 100 maxconn 1000

backend ganglia_server
    server x.x.x.x_55555   x.x.x.x:55555	check weight 100 maxconn 1000

backend auth_server
    server x.x.x.x_8889	x.x.x.x:8889	check weight 100 maxconn 1000

backend amap_server
    server x.x.x.x_80 x.x.x.x:80	check weight 100 maxconn 1000

backend thrift_server
    server x.x.x.x_8890 0.0.0.0:8890      check weight 100 maxconn 1000

#backend log_server
#    server x.x.x.x_80 x.x.x.x:80      check weight 100 maxconn 1000

backend hue_server
    server x.x.x.x_8888 x.x.x.x:8888      check weight 100 maxconn 1000

加载中
0
东软ADSG
东软ADSG

1.得能加载证书;

2.得能做到会话保持。

这两个对haproxy来说是缺陷吧。

可以改用nginx/SEnginx(nginx增强版)

返回顶部
顶部