Installing Apache 2.4 on Centos 6 with HTTP2 support

Download, compile & install openssl 1.02 somewhere (eg /usr/local/openssl102)
IMPORTANT: config with -fPIC flag

./config --prefix=/usr/local/openssl102 -fPIC no-gost no-shared no-zlib && make && make install

Download compile & install nghttp2 (straightforward, I went for default path – to ensure it’s picked up by apache module create /etc/ld.so.conf.d/local.conf with contents /usr/local/lib & run ldconfig unless this is already in your linker dirs).

Download and untar apache 2.4.17

Download and untar latest apr & apr-util,
unpack them into ./srclib/apr and ./srclib/apr-util inside apache distributrion (be sure the dir names
do not have version numbers; for example, the APR distribution must be under ./srclib/apr/)

Config & compile apache

# set prefix if you want, default will install to /usr/local/apache2
# add --with-lua if you have it installed for fun!
./configure --enable-http2 --enable-ssl --with-ssl=/usr/local/openssl102 --with-included-apr
make
make install

Configure apache to use http2.

To test your http2 server you might want a recent build of curl, download the latest and configure like so:

./configure --with-ssl=/usr/local/openss102 --prefix=/usr/local/curl --with-nghttp2=/usr/local