Now Hiring: Are you a driven and motivated 1st Line IT Support Engineer?

Blog

DirectAdmin 启用HTTP/2支持

其它内容

DirectAdmin 启用HTTP/2支持

Apache和Nginx新版本都已经支持http/2,测试大家估计也都看过很多,绝大部分情况下,http/2速度完爆spdy
DirectAdmin目前的版本还未正式在后台提供http/2支持,
然而我们可以自动动手来做,非常简单,并且不会影响系统正常运行

首先安装新版的OpenSSL,因为只有新版的才支持ALPN
我这里直接安装到其他位置不会覆盖系统原有的openssl

然后安装nghttp2,DirectAdmin面板已经自带,
然而并未正式提供该功能,应该是为了以后支持http/2提前做好了准备

拷贝文件,启用自定义Apache编译规则

修改 /usr/local/directadmin/custombuild/custom/ap2/configure.apache文件
找到这一行

修改为这样

开始编译Apache

编辑httpd文件加入http/2支持语句

更新SSL Ciphers /etc/httpd/conf/extra/httpd-ssl.conf

然后就可以了。目前测试http/2的支持还算完美,然而有一个不大不小的bug 存在,
我自己测试发现如果使用泛域名证书的话,浏览器只能成功访问第一个引用的https网站,第二个会失败
比如:*.xxx.com泛域名证书,你在同一个服务器上部署了多个二级域名,a.xxx.com和b.xxx.com,
你访问了https://a.xxx.com后,再访问https://b.xxx.com就会失败,这个是Apache新版本的bug,下个版本才会修复

Leave your thought here

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理

Select the fields to be shown. Others will be hidden. Drag and drop to rearrange the order.
  • Image
  • SKU
  • Rating
  • Price
  • Stock
  • Availability
  • Add to cart
  • Description
  • Content
  • Weight
  • Dimensions
  • Additional information
Click outside to hide the comparison bar
Compare