我正在使用HAProxy作爲負載平衡器並終止SSL。在這之後我放置了一個Nginx。我想用spdy/3.1。SPDY與HAProxy和Nginx
它不適用於以下haproxy.conf和nginx.cfg。 (文件是serverd,但根據Chrome SPDY/HTTP2 Indicator Plugin它只是普通的HTTP/1.1流量)。
我試圖去除不必要的部分。
我在做什麼錯?你有調試技巧嗎?
(HAProxy的1.6電流和NGINX 1.10穩定線)
haproxy.cfg:
global
daemon
tune.ssl.default-dh-param 2048
defaults
mode tcp
frontend myfrontend
bind *:80
bind *:443 ssl crt /etc/ssl/certificate.pem npn spdy/3.1,http/1.1 ciphers ECDH+AESGCM:HIGH:!aNULL:!MD5:!DSS:!RC4; no-sslv3
acl istoplevel path/
redirect scheme https if istoplevel !{ ssl_fc }
redirect location/if !istoplevel !{ ssl_fc }
rspadd Strict-Transport-Security:\ max-age=31536000;
default_backend mybackend
backend mybackend
server s1 localhost:81
option forwardfor
http-request set-header X-Forwarded-Port %[dst_port]
http-request add-header X-Forwarded-Proto https if { ssl_fc }
nginx.conf:
user nginx;
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
sendfile on;
#tcp_nopush on;
server {
listen 81 spdy;
root /usr/share/nginx/html;
index index.html;
location/{
try_files $uri $uri/ /index.html;
}
}
}
Nginx的是建立與--with-http_v2模塊。那包括spdy?文檔沒有那麼詳細 – nxrd