Answer the question
In order to leave comments, you need to log in
How to configure Haproxy with SPDY or HTTP/2 support in TCP ALPN mode?
Most SPDY and HTTP/2 servers won't let you hang unsecured SPDY or HTTP/2 on a separate port, but Nginx does. Here are working configs for this:
haproxy.conf
defaults
mode tcp
timeout client 10s
timeout connect 10s
timeout server 10s
frontend spdyRaw
bind 0.0.0.0:443 ssl crt cert.pem alpn spdy/3.1
default_backend nginxSpdyRaw
backend nginxSpdyRaw
server backend1 0.0.0.0:82
frontend spdySsl
bind 0.0.0.0:444 ssl crt cert.pem alpn spdy/3.1
default_backend nginxSpdySsl
backend nginxSpdySsl
server backend2 0.0.0.0:83
events {
worker_connections 2048;
}
http {
server {
ssl_certificate /server.crt;
ssl_certificate_key /server.key;
listen 0.0.0.0:82 spdy;
listen 0.0.0.0:83 ssl spdy;
location / {
return 200 "Hello Spdy!";
}
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question