首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >具有多个https站点的HAproxy

具有多个https站点的HAproxy
EN

Stack Overflow用户
提问于 2019-03-04 12:49:19
回答 1查看 276关注 0票数 1

我试图在have配置上配置两个站点,目前我只保留了

  1. https://hpc7065.eng.fireeye.com/hawkeye
  2. https://hpc7065.eng.fireeye.com/hue

下面是配置

代码语言:javascript
复制
frontend https-in
    mode tcp
    bind hpc7065.eng.fireeye.com:443 ssl crt /opt/cloudera/security/haproxy/final.pem
    balance source
    acl is_hawkeye url_beg hawkeye
    acl is_hue url_beg hue
    use_backend hue_cluster if is_hue

backend hue_cluster
    mode tcp
    balance source
    server Hue_1 hpc7021.eng.fireeye.com:8888 check
    server Hue_2 hpc7022.eng.fireeye.com:8888 check

backend hawkeye_cluster
    mode tcp
    balance source
    server Hue_1 hpc7021.eng.fireeye.com:8000 check
    server Hue_2 hpc7022.eng.fireeye.com:8000 check

错误

代码语言:javascript
复制
curl -k https://hpc7065.eng.fireeye.com/hue -vvv
* About to connect() to hpc7065.eng.fireeye.com port 443 (#0)
*   Trying 10.11.108.75...
* Connected to hpc7065.eng.fireeye.com (10.11.108.75) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* skipping SSL peer certificate verification
* SSL connection using TLS_DHE_RSA_WITH_AES_256_CBC_SHA
* Server certificate:
*   subject: E=FenetDBTeam@FireEye.com,CN=hpc7065.eng.fireeye.com,OU=DTI-NG,O="FireEye, Inc.",L=Milpitas,ST=California,C=US
*   start date: May 22 10:11:52 2018 GMT
*   expire date: May 21 10:11:52 2020 GMT
*   common name: hpc7065.eng.fireeye.com
*   issuer: CN=FireEye Issuing CA 1
> GET /hue HTTP/1.1
> User-Agent: curl/7.29.0
> Host: hpc7065.eng.fireeye.com
> Accept: */*
> 
* Empty reply from server
* Connection #0 to host hpc7065.eng.fireeye.com left intact
curl: (52) Empty reply from server
EN

回答 1

Stack Overflow用户

发布于 2019-03-06 09:35:49

我必须通过在后端服务器上添加ssl关键字来解决这个问题,因为我的后端服务器不接受纯文本。

代码语言:javascript
复制
frontend https-in
    mode http
    bind hpc7065.eng.fireeye.com:443 ssl crt /opt/cloudera/security/haproxy/final.pem
    balance source
    acl is_hawkeye url_beg hawkeye
    acl is_hue url_beg hue
    use_backend hue_cluster if is_hue

backend hue_cluster
    mode http
    balance source
    server Hue_1 hpc7021.eng.fireeye.com:8888 check ssl
    server Hue_2 hpc7022.eng.fireeye.com:8888 check ssl

backend hawkeye_cluster
    mode http
    balance source
    server Hue_1 hpc7021.eng.fireeye.com:8000 check ssl
    server Hue_2 hpc7022.eng.fireeye.com:8000 check ssl
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/54983652

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档