【问题标题】:Unable to start domain with https无法使用 https 启动域
【发布时间】:2013-08-08 05:40:22
【问题描述】:

我正在处理haproxy。我想用http 打开我的网站。我已经购买了ssl证书并安装在服务器上。

ha.cfg我配置如下:

 global
    tune.bufsize    32786
        tune.maxrewrite 16384
    log 127.0.0.1   local0
    log 127.0.0.1   local1  notice
    maxconn 8192
    user    haproxy
    group   haproxy
    daemon

 defaults
    log global
    mode    http
    option  httplog
    option  dontlognull
    retries 3
    option  redispatch
    balance roundrobin
    stats   enable
    stats   refresh
    stats   uri /ssproxy_stats
        stats   realm   Haproxy\    Statistics
        stats   auth    haproxy:haproxy
    maxconn 4000
    contimeout  5000
    clitimeout  50000
    srvtimeout  50000

 frontend http
    bind    *:80
    acl hari path_beg /customers
    acl css path_beg /assets
    reqadd X-Forwarded-Proto:\ http
    use_backend appointpress_app if hari
    use_backend appointpress_app if css
    default_backend appointpress_site

 frontend https
    bind    *:443 ssl crt /etc/ssl/ssl.key/mydomain.crt
    default_backend appointpress_site

 backend    appointpress_app :80
    stats   enable
    stats   auth    haproxy:haproxy
    cookie  SERVERID    insert
    option  httpclose
    option  forwardfor
    server  app_server  ec2-elastic-domain:80   cookie  haproxy_app check

 backend    appointpress_site :80
    stats   enable
        stats   auth    haproxy:haproxy
    cookie  SERVERID    insert
    option  httpclose
    option  forwardfor
    server  wordpress   someip:443  cookie  haproxy_site    check

运行命令haproxy -f ha.cfg后我没有收到任何错误,

当我运行 url http://ec2-instance 时,它工作正常

但是在运行https://ec2-instance时,

我收到错误:

在 chrome 中:错误代码:ERR_SSL_PROTOCOL_ERROR

在 Firefox 中:错误代码:ssl_error_rx_record_too_long

如何解决错误

【问题讨论】:

    标签: ssl https amazon-ec2 haproxy


    【解决方案1】:

    检查以确保您的 EC2 安全规则允许端口 443 访问您正在运行的实例。一个简单的测试方法是使用客户端的 telnet:

    telnet ec2-instance 443
    

    【讨论】:

      猜你喜欢
      • 2017-11-22
      • 1970-01-01
      • 2014-12-23
      • 2020-04-04
      • 2023-03-23
      • 1970-01-01
      • 2019-09-13
      • 1970-01-01
      • 2016-06-06
      相关资源
      最近更新 更多