HAProxy不适用于ALPN

我需要使用ALPN来configurationHAProxy以支持HTTP / 2。 configurationHAProxy后,我尝试重新启动,但失败了。 即使将openssl升级到1.0.2也没有帮助。 维基百科自从1.0.2开始支持ALPN。 我运行的系统是Ubunut 14.04。 LTS

这些是错误信息:

[ALERT] 364/162959 (3104) : parsing [/etc/haproxy/haproxy.cfg:137] : 'bind 192.143.56.150:443' : 'alpn' : library does not support TLS ALPN extension [ALERT] 364/162959 (3104) : parsing [/etc/haproxy/haproxy.cfg:142] : error detected while parsing switching rule : unknown fetch method 'ssl_fc_alpn' in ACL expression 'ssl_fc_alpn'. [ALERT] 364/162959 (3104) : Error(s) found in configuration file : /etc/haproxy/haproxy.cfg * Restarting haproxy haproxy [fail] $ openssl version -v OpenSSL 1.0.2j 26 Sep 2016 $ haproxy -vv | grep -i openssl OPTIONS = USE_ZLIB=1 USE_OPENSSL=1 USE_PCRE=1 Built with OpenSSL version : OpenSSL 1.0.1f 6 Jan 2014 Running on OpenSSL version : OpenSSL 1.0.1f 6 Jan 2014 OpenSSL library supports TLS extensions : yes OpenSSL library supports SNI : yes OpenSSL library supports prefer-server-ciphers : yes 

我有印象,因为HAProxy是用旧的openssl库build立的,我需要重build。 它是否正确? 如果是的话,最好的办法是什么? 不知道这是一个Ubuntu包还是自编译的。

也许这个链接在Ubuntu上编译HAProxy来源会对你有用。

我有印象,因为HAProxy是用旧的openssl库build立的,我需要重build。 它是否正确?

是。 或者至less安装一个更现代的版本。

如果是的话,最好的办法是什么? 不知道这是一个Ubuntu包还是自编译的。

那么,如果你能得到一个有关安装源的想法,那就太好了。 我刚刚检查过, Ubuntu 14.04提供的HAProxy的backport是针对openssl 1.0.1编译的,所以你什么也得不到。 你可以使用这个服务来获得你的操作系统的现代软件包; 这些由维护者Vincent Bernat提供。 如果您需要进一步帮助,请告诉我。