DirectAdmin enables HTTP/2 support

  
 

The new versions of Apache and Nginx already support http/2. The test has been estimated to have seen a lot. In most cases, the current version of http/2 speed spdyDirectAdmin has not officially provided http/2 support in the background. However, we can do it automatically, it is very simple, and will not affect the normal operation of the system.

First install the new version of OpenSSL, because only the new version supports ALPN. I will install it directly to other locations and will not overwrite the system. Some opensslwget http://codes.yutian.org/Linux/software/openssl-1.0.2d.tar.gztar xzf openssl-1.0.2d.tar.gzcd openssl-1.0.2d./config --prefix=/usr /local/lib_http2 no-ssl2 no-ssl3 zlib-dynamicmake dependmake install

Then install nghttp2, the DirectAdmin panel is already included, but this feature is not officially provided. It should be done in advance to support http/2 in advance. Prepare cd /usr/local/directadmin/custombuild./build update./build nghttp2

Copy files, enable custom Apache compilation rules cd /usr/local/directadmin/custombuildmkdir -p custom/ap2cp -p Configure/ap2/configure.apache Custom/ap2/configure.apache

Modify the /usr/local/directadmin/custombuild/custom/ap2/configure.apache file to find this line"--with-ssl=/usr" \\

Modify to such a "--enable-http2" \\"--enable-ssl-staticlib-deps" \\"--with-ssl=/usr/local/lib_http2" \\

Start Compile Apache./build apache

Edit httpd file to add http/2 support statement echo 'ProtocolsHonorOrder On' >> /etc/httpd/conf/extra/httpd-includes.confecho 'Protocols h2 h2c http/1.1' >> /etc/httpd/conf/extra/httpd-includes.conf

Update SSL Ciphers /etc/httpd/conf/extra/httpd-ssl.confcd /usr/local/directadmin/Custombuild./build rewrite_confs

Then it will be fine. Currently testing http/2 support is still perfect, but there is a small bug, my own test found that if you use a generic domain name certificate, the browser can only successfully access the first referenced https website, the second Will fail, for example: *.xxx.com pan-domain certificate, you have deployed multiple second-level domain names on the same server, a.xxx.com and b.xxx.com, you visited https://a.xxx. After com, visiting https://b.xxx.com will fail. This is a bug in the new version of Apache. The next version will be fixed

Copyright © Windows knowledge All Rights Reserved