Search code examples
nginxopensslcentospassengerhttp2

Passenger nginx with HTTP/2 ALPN support on CentOS 7


I installed passenger-modded version of nginx following this guide.

Unfortunately the version of nginx in the RPM was built with OpenSSL 1.0.1e which does not provide HTTP/2 ALPN support. Is building nginx from source my only option to enable HTTP/2 in this configuration?


Solution

  • You've a few options:

    1. Install from source with OpenSSL also built from source.
    2. Use Docker or other container technology to run this.
    3. Upgrade to Centos 7.4 (literally just released at time of writing) as this includes OpenSSL 1.0.2 which includes ALPN support.
    4. Use a CDN in front of your server so they provide the HTTP/2 support and you can stay on HTTP/1 for now. Cloudflare offer free plans for this for example.
    5. Similar to above, put another server/load balancer in front of Nginx which supports HTTP/2 and proxies requests to Nginx.