0

に取り組んでい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

エラーが発生しています:

クロームで:エラーコード:ERR_SSL_PROTOCOL_ERROR

Firefox の場合: エラー コード:ssl_error_rx_record_too_long

エラーの解決方法

4

1 に答える 1

1

EC2 セキュリティ ルールで、実行中のインスタンスにポート 443 が許可されていることを確認してください。これをテストする簡単な方法は、クライアントから telnet を使用することです。

telnet ec2-instance 443
于 2013-08-07T21:40:22.450 に答える