http/2 apache centos7

1. Using epel test repository you can install nghttp2 and libnghttp2-devel libraries.

2. then get and compile openssl using
./config shared -fPIC
make
make install

3. create symlinks in
/usr/lib64/libssl.so.1.0.0
/usr/lib64/libcrypto.so.1.0.0

to
/usr/local/ssl/lib/libcrypto.so.1.0.0
/usr/local/ssl/lib/libssl.so.1.0.0

4. because for now cpanel doesn’t allow mod_http2 and ignores it in easyapache, I downloaded latest apache sources to /home/cpeasyapache/httpd-2.4.18/ and did
./configure --enable-http2=shared --disable-v4-mapped --enable-access-compat=static --enable-actions=static --enable-alias=static --enable-asis=static --enable-auth_basic=static --enable-authn_core=static --enable-authn_file=static --enable-authz_core=static --enable-authz_groupfile=static --enable-authz_host=static --enable-authz_user=static --enable-autoindex=static --enable-cgi=static --enable-deflate=static --enable-dir=static --enable-env=static --enable-expires=static --enable-filter=static --enable-headers=static --enable-include=static --enable-log_config=static --enable-logio=static --enable-mime=static --enable-modules=none --enable-negotiation=static --enable-proxy=static --enable-proxy-connect=static --enable-proxy-http=static --enable-rewrite=static --enable-setenvif=static --enable-slotmem_shm=static --enable-socache_dbm=static --enable-socache_shmcb=static --enable-ssl=static --enable-status=static --enable-suexec=static --enable-unique-id=static --enable-unixd=static --enable-userdir=static --enable-version=static --enable-vhost-alias=static --prefix=/usr/local/apache --with-crypto --with-included-apr --with-mpm=worker --with-pcre=/opt/pcre --with-ssl=/usr --with-ssl=/usr/local/ssl --with-suexec-caller=nobody --with-suexec-docroot=/ --with-suexec-gidmin=100 --with-suexec-logfile=/usr/local/apache/logs/suexec_log --with-suexec-uidmin=100 --with-suexec-userdir=public_html CPPFLAGS=-I/usr/local/ssl/include LDFLAGS=-L/usr/local/ssl/lib

make

5. in /usr/local/cpanel/scripts/before_apache_make add
yes | cp -r /home/cpeasyapache/httpd-2.4.18/* /home/cpeasyapache/src/httpd-2.4

6. create /var/cpanel/easy/apache/rawopts/Apache2_4 and add there:
--enable-http2=shared --with-ssl=/usr/local/ssl LDFLAGS=-L/usr/local/ssl/lib CPPFLAGS=-I/usr/local/ssl/include

7. if everything is OK enable http2
LoadModule http2_module modules/mod_http2.so

Protocols h2 h2c http/1.1