Test your web server for HTTP/2 and ALPN support KeyCDN
Test SSL strength of your setup SSL LABS
chrome 51 dropped HTTP/2 via NPN
we need to support HTTP/2 via ALPN, however... on Ubuntu 14.04
NGINX has been compiled with OpenSSL 1.0.1 which does not support ALPN
so upgrade OpenSSL to 1.0.2
sudo - su
wget https://www.openssl.org/source/openssl-1.0.2-latest.tar.gz
tar xzvf openssl-1.0.2-latest.tar.gz
cd {{ dir }}
./config
make
make test
make install
openssl version
# if old version persists
mv /usr/bin/openssl /root/
ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl
# move new source to /usr/lcoal for nginx conf
cd
mv {{ dir }} /usr/local
#[check the release notes for the latest version]
NPS_VERSION=1.12.34.2-stable
cd
wget https://github.com/pagespeed/ngx_pagespeed/archive/v${NPS_VERSION}.zip
unzip v${NPS_VERSION}.zip
cd ngx_pagespeed-${NPS_VERSION}/
NPS_RELEASE_NUMBER=${NPS_VERSION/beta/}
NPS_RELEASE_NUMBER=${NPS_VERSION/stable/}
psol_url=https://dl.google.com/dl/page-speed/psol/${NPS_RELEASE_NUMBER}.tar.gz
[ -e scripts/format_binary_url.sh ] && psol_url=$(scripts/format_binary_url.sh PSOL_BINARY_URL)
wget ${psol_url}
tar -xzvf $(basename ${psol_url}) # extracts to psol/
NGINX_VERSION=[check nginx's site for the latest version]
cd
wget http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz
tar -xvzf nginx-${NGINX_VERSION}.tar.gz
cd nginx-${NGINX_VERSION}/
# ./configure --add-module=$HOME/ngx_pagespeed-${NPS_VERSION} ${PS_NGX_EXTRA_FLAGS}
./configure \
--prefix=/etc/nginx \
--sbin-path=/usr/sbin/nginx \
--modules-path=/usr/lib/nginx/modules \
--conf-path=/etc/nginx/nginx.conf \
--error-log-path=/var/log/nginx/error.log \
--http-log-path=/var/log/nginx/access.log \
--pid-path=/var/run/nginx.pid \
--lock-path=/var/run/nginx.lock \
--user=nginx \
--group=nginx \
--with-compat \
--with-threads \
--with-http_addition_module \
--with-http_random_index_module \
--with-http_realip_module \
--with-http_secure_link_module \
--with-http_slice_module \
--with-http_v2_module \
--with-http_ssl_module \
--with-openssl=/usr/local/openssl-1.0.2l \
--with-http_gzip_static_module \
--add-dynamic-module=$HOME/ngx_pagespeed
make
sudo make install
echo | openssl s_client -alpn h2 -connect example.com:443 | grep ALPN
openssl version -a
nginx -V
- https://fak3r.com/2015/09/29/howto-build-nginx-with-http-2-support/
- https://www.bjornjohansen.no/optimizing-https-nginx
- https://www.bjornjohansen.no/redirect-to-https-with-nginx
- https://docs.mattermost.com/install/config-ssl-http2-nginx.html
- https://www.nginx.com/blog/supporting-http2-google-chrome-users/
- https://ethitter.com/2016/06/nginx-openssl-1-0-2-http-2-alpn/
- https://gist.github.com/esurdam/8bb74fa86db0629202d9c32238b56e4d
- https://alex.bouma.me/recompile-nginx-with-openssl-1-0-2-for-http-2-via-alpn-ubuntu-14-04/
https://hpbn.co/primer-on-web-performance/#latency-as-a-performance-bottleneck