Question

How to get already installed NGINX to use OpenSSL 1.0.2 for ALPN?

Hello,

I would like to use HTTP/2 and to fully use its capabilities, it needs ALPN (and not NPN). ALPN is bundled in OpenSSL 1.0.2, but NGINX doesn’t seem to use it. I have upgraded everything and currently I am at NGINX 1.10.0 and OpenSSL 1.0.2h.

http://i.imgur.com/khtNxxy.png

As you can see in the screenshot above, OpenSSL 1.0.2h is indeed installed on the server as is the latest version of NGINX 1.10.0. OpenSSL was already at 1.0.2h when I upgraded from NGINX 1.9 to 1.10.

Any help to get NGINX to use OpenSSL 1.0.2 or how I can enable ALPN would be greatly appreciated.

Thank you!

PS I have no clue on how I could recompile NGINX. I’ve always simply used apt-get install nginx.


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

  1. rebuiding openssl
$ wget -c https://www.openssl.org/source/openssl-1.0.2h.tar.gz
$ tar xf openssl-1.0.2h.tar.gz -C /usr/local/
$ cd /usr/local/openssl-1.0.2h
$ ./config
$ make depend
$ make
$ make test
$ make install
$ mv /usr/bin/openssl /usr/bin/openssl_1.0.1e
$ ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl
$ openssl version
OpenSSL 1.0.2h  3 May 2016
  1. rebuild nginx
$ yum -y install pcre-devel
$ tar xf nginx-1.8.1.tar.gz
$ cd nginx-1.8.1
$ ./configure --prefix=/usr/local/nginx \
	--with-http_ssl_module --with-openssl=/usr/local/openssl-1.0.2h/ 
  ...

My way to have http2 + alpn on https://glavpooltorg.su: Add jessie-backports repository

deb http://ftp.debian.org/debian jessie-backports main

Install openssl with apt-get

apt-get -t jessie-backports install openssl

and then rebuild nginx from source “as is”.

Yeah! glavpooltorg.su supports HTTP/2.0.
ALPN supported.

This comment has been deleted