【发布时间】: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