06 Oct 2016 @ 3:44 PM 

If you need http/2 enabled at your CPanel server, you need to do few things:

1. Install nghttp2


cd /usr/src/
wget https://github.com/nghttp2/nghttp2/releases/download/v1.15.0/nghttp2-1.15.0.tar.gz
tar -xvzf nghttp2-1.15.0.tar.gz
cd nghttp2-1.15.0
./configure --prefix=/opt/nghttp2
make
make install
echo "/opt/nghttp2/lib" >> /etc/ld.so.conf.d/custom-libs.conf
ldconfig

2. Install openssl


cd /usr/src/
wget https://www.openssl.org/source/openssl-1.0.2j.tar.gz
tar -xvzf openssl-1.0.2j.tar.gz
cd openssl-1.0.2j
./config shared -fPIC --prefix=/opt/openssl
make
make install

3. Install curl


mv /opt/curlssl /opt/curlssl_orig
cd /usr/src/
wget https://curl.haxx.se/download/curl-7.50.3.tar.gz
tar -xvzf curl-7.50.3.tar.gz
env LDFLAGS=-R/opt/openssl/lib CPPFLAGS=-I/opt/openssl/include ./configure --prefix=/opt/curlssl --with-ssl=/opt/openssl --enable-http --enable-ftp --with-nghttp2=/opt/nghttp2
make
make install

4. Add following lines into /var/cpanel/easy/apache/rawopts/Apache2_4


--enable-http2=static
--enable-ssl=static
--with-nghttp2=/opt/nghttp2
--with-crypto=/opt/openssl/lib
--with-ssl=/opt/openssl

5. Rebuild or update Apache to version 2.4 via EasyApache

/scripts/easyapache

6. Enable HTTP2 in Apache config:

echo "Protocols h2 h2c http/1.1" >> /usr/local/apache/conf/includes/pre_main_global.conf

7. Restart Apache

service httpd restart

Finaly, you can find http2 module via

httpd -M | grep http2

or check your website via https://tools.keycdn.com/http2-test

Posted By: lvlind
Last Edit: 06 Oct 2016 @ 04:09 PM

EmailPermalink
Tags


 

Responses to this post » (None)

 
Post a Comment

You must be logged in to post a comment.

Tags
Comment Meta:
RSS Feed for comments

 Last 50 Posts
Change Theme...
  • Users » 1
  • Posts/Pages » 34
  • Comments » 0
Change Theme...
  • VoidVoid « Default
  • LifeLife
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LightLight

About



    No Child Pages.

Need Help?



    No Child Pages.

Check your IP



    No Child Pages.