NGINX with Brotli and OpenSSL 1.1 for CentOS 7 and RHEL 7: CodeIT builds 2016-2018

From September 2016 to June 2018, CodeIT built NGINX mainline 1.11 to 1.15 and stable 1.10 to 1.14 for Red Hat Enterprise Linux 7 and CentOS 7. Each build had the ngx_brotli module and a newer OpenSSL than the system OpenSSL. Some builds were early tests of TLS 1.3. This page collects the release posts of that period and the questions and answers of their readers.

Key facts

  • Mainline versions: 1.11.4, 1.11.7, 1.11.8, 1.11.9, 1.11.10, 1.11.11, 1.11.13, 1.13.0, 1.13.5, 1.13.6, 1.13.7, 1.13.8 and 1.15.0.
  • Stable versions: 1.10.2, 1.12.0, 1.12.1 and 1.14.0.
  • Each build had Brotli compression (ngx_brotli) and HTTP/2.
  • Up to February 2017, the builds used OpenSSL 1.0.2. Then they used OpenSSL 1.1.0 (1.1.0e to 1.1.0g).
  • TLS 1.3 tests: NGINX 1.11.11 (March 2017) with the OpenSSL tls1.3-draft-18 branch, then NGINX 1.14.0 and 1.15.0 (2018) with OpenSSL 1.1.1-pre2 and TLS 1.3 draft 23.

Release posts in this period

Upstream changes by version

The lists below are the upstream change notes for each nginx release in this period, from the official CHANGES file.

nginx 1.15.0

Changes

  • Change: the “ssl” directive is deprecated; the “ssl” parameter of the “listen” directive should be used instead.
  • Change: now nginx detects missing SSL certificates during configuration testing when using the “ssl” parameter of the “listen” directive.
  • Feature: now the stream module can handle multiple incoming UDP datagrams from a client within a single session.
  • Bugfix: it was possible to specify an incorrect response code in the “proxy_cache_valid” directive.
  • Bugfix: nginx could not be built by gcc 8.1.
  • Bugfix: logging to syslog stopped on local IP address changes.
  • Bugfix: nginx could not be built by clang with CUDA SDK installed; the bug had appeared in 1.13.8.
  • Bugfix: “getsockopt(TCP_FASTOPEN) … failed” messages might appear in logs during binary upgrade when using unix domain listen sockets on FreeBSD.
  • Bugfix: nginx could not be built on Fedora 28 Linux.
  • Bugfix: request processing rate might exceed configured rate when using the “limit_req” directive.
  • Bugfix: in handling of client addresses when using unix domain listen sockets to work with datagrams on Linux.
  • Bugfix: in memory allocation error handling.

nginx 1.13.12

Changes

  • Bugfix: connections with gRPC backends might be closed unexpectedly when returning a large response.

nginx 1.13.11

Changes

  • Feature: the “proxy_protocol” parameter of the “listen” directive now supports the PROXY protocol version 2.
  • Bugfix: nginx could not be built with OpenSSL 1.1.1 statically on Linux.
  • Bugfix: in the “http_404”, “http_500”, etc. parameters of the “proxy_next_upstream” directive.

nginx 1.13.10

Changes

  • Feature: the “set” parameter of the “include” SSI directive now allows writing arbitrary responses to a variable; the “subrequest_output_buffer_size” directive defines maximum response size.
  • Feature: now nginx uses clock_gettime(CLOCK_MONOTONIC) if available, to avoid timeouts being incorrectly triggered on system time changes.
  • Feature: the “escape=none” parameter of the “log_format” directive.
  • Feature: the $ssl_preread_alpn_protocols variable in the ngx_stream_ssl_preread_module.
  • Feature: the ngx_http_grpc_module.
  • Bugfix: in memory allocation error handling in the “geo” directive.
  • Bugfix: when using variables in the “auth_basic_user_file” directive a null character might appear in logs.

nginx 1.13.9

Changes

  • Feature: HTTP/2 server push support; the “http2_push” and “http2_push_preload” directives.
  • Bugfix: “header already sent” alerts might appear in logs when using cache; the bug had appeared in 1.9.13.
  • Bugfix: a segmentation fault might occur in a worker process if the “ssl_verify_client” directive was used and no SSL certificate was specified in a virtual server.
  • Bugfix: in the ngx_http_v2_module.
  • Bugfix: in the ngx_http_dav_module.

nginx 1.13.8

Changes

  • Feature: now nginx automatically preserves the CAP_NET_RAW capability in worker processes when using the “transparent” parameter of the “proxy_bind”, “fastcgi_bind”, “memcached_bind”, “scgi_bind”, and “uwsgi_bind” directives.
  • Feature: improved CPU cache line size detection.
  • Feature: new directives in vim syntax highlighting scripts.
  • Bugfix: binary upgrade refused to work if nginx was re-parented to a process with PID different from 1 after its parent process has finished.
  • Bugfix: the ngx_http_autoindex_module incorrectly handled requests with bodies.
  • Bugfix: in the “proxy_limit_rate” directive when used with the “keepalive” directive.
  • Bugfix: some parts of a response might be buffered when using “proxy_buffering off” if the client connection used SSL.
  • Bugfix: in the “proxy_cache_background_update” directive.
  • Bugfix: it was not possible to start a parameter with a variable in the “${name}” form with the name in curly brackets without enclosing the parameter into single or double quotes.

nginx 1.13.7

Changes

  • Bugfix: in the $upstream_status variable.
  • Bugfix: a segmentation fault might occur in a worker process if a backend returned a “101 Switching Protocols” response to a subrequest.
  • Bugfix: a segmentation fault occurred in a master process if a shared memory zone size was changed during a reconfiguration and the reconfiguration failed.
  • Bugfix: in the ngx_http_fastcgi_module.
  • Bugfix: nginx returned the 500 error if parameters without variables were specified in the “xslt_stylesheet” directive.
  • Workaround: “gzip filter failed to use preallocated memory” alerts appeared in logs when using a zlib library variant from Intel.
  • Bugfix: the “worker_shutdown_timeout” directive did not work when using mail proxy and when proxying WebSocket connections.

nginx 1.13.6

Changes

  • Bugfix: switching to the next upstream server in the stream module did not work when using the “ssl_preread” directive.
  • Bugfix: in the ngx_http_v2_module.
  • Bugfix: nginx did not support dates after the year 2038 on 32-bit platforms with 64-bit time_t.
  • Bugfix: in handling of dates prior to the year 1970 and after the year 10000.
  • Bugfix: in the stream module timeouts waiting for UDP datagrams from upstream servers were not logged or logged at the “info” level instead of “error”.
  • Bugfix: when using HTTP/2 nginx might return the 400 response without logging the reason.
  • Bugfix: in processing of corrupted cache files.
  • Bugfix: cache control headers were ignored when caching errors intercepted by error_page.
  • Bugfix: when using HTTP/2 client request body might be corrupted.
  • Bugfix: in handling of client addresses when using unix domain sockets.
  • Bugfix: nginx hogged CPU when using the “hash … consistent” directive in the upstream block if large weights were used and all or most of the servers were unavailable.

nginx 1.13.5

Changes

  • Feature: the $ssl_client_escaped_cert variable.
  • Bugfix: the “ssl_session_ticket_key” directive and the “include” parameter of the “geo” directive did not work on Windows.
  • Bugfix: incorrect response length was returned on 32-bit platforms when requesting more than 4 gigabytes with multiple ranges.
  • Bugfix: the “expires modified” directive and processing of the “If-Range” request header line did not use the response last modification time if proxying without caching was used.

nginx 1.13.4

Changes

  • Feature: the ngx_http_mirror_module.
  • Bugfix: client connections might be dropped during configuration testing when using the “reuseport” parameter of the “listen” directive on Linux.
  • Bugfix: request body might not be available in subrequests if it was saved to a file and proxying was used.
  • Bugfix: cleaning cache based on the “max_size” parameter did not work on Windows.
  • Bugfix: any shared memory allocation required 4096 bytes on Windows.
  • Bugfix: nginx worker might be terminated abnormally when using the “zone” directive inside the “upstream” block on Windows.

nginx 1.13.3

Security fixes

  • Security: a specially crafted request might result in an integer overflow and incorrect processing of ranges in the range filter, potentially resulting in sensitive information leak (CVE-2017-7529).

nginx 1.13.2

Changes

  • Change: nginx now returns 200 instead of 416 when a range starting with 0 is requested from an empty file.
  • Feature: the “add_trailer” directive.
  • Bugfix: nginx could not be built on Cygwin and NetBSD; the bug had appeared in 1.13.0.
  • Bugfix: nginx could not be built under MSYS2 / MinGW 64-bit.
  • Bugfix: a segmentation fault might occur in a worker process when using SSI with many includes and proxy_pass with variables.
  • Bugfix: in the ngx_http_v2_module.

nginx 1.13.1

Changes

  • Feature: now a hostname can be used as the “set_real_ip_from” directive parameter.
  • Feature: vim syntax highlighting scripts improvements.
  • Feature: the “worker_cpu_affinity” directive now works on DragonFly BSD.
  • Bugfix: SSL renegotiation on backend connections did not work when using OpenSSL before 1.1.0.
  • Workaround: nginx could not be built with Oracle Developer Studio 12.5.
  • Workaround: now cache manager ignores long locked cache entries when cleaning cache based on the “max_size” parameter.
  • Bugfix: client SSL connections were immediately closed if deferred accept and the “proxy_protocol” parameter of the “listen” directive were used.
  • Bugfix: in the “proxy_cache_background_update” directive.
  • Workaround: now the “tcp_nodelay” directive sets the TCP_NODELAY option before an SSL handshake.

nginx 1.13.0

Changes

  • Change: SSL renegotiation is now allowed on backend connections.
  • Feature: the “rcvbuf” and “sndbuf” parameters of the “listen” directives of the mail proxy and stream modules.
  • Feature: the “return” and “error_page” directives can now be used to return 308 redirections.
  • Feature: the “TLSv1.3” parameter of the “ssl_protocols” directive.
  • Feature: when logging signals nginx now logs PID of the process which sent the signal.
  • Bugfix: in memory allocation error handling.
  • Bugfix: if a server in the stream module listened on a wildcard address, the source address of a response UDP datagram could differ from the original datagram destination address.

nginx 1.11.13

Changes

  • Feature: the “http_429” parameter of the “proxy_next_upstream”, “fastcgi_next_upstream”, “scgi_next_upstream”, and “uwsgi_next_upstream” directives.
  • Bugfix: in memory allocation error handling.
  • Bugfix: requests might hang when using the “sendfile” and “timer_resolution” directives on Linux.
  • Bugfix: requests might hang when using the “sendfile” and “aio_write” directives with subrequests.
  • Bugfix: in the ngx_http_v2_module.
  • Bugfix: a segmentation fault might occur in a worker process when using HTTP/2.
  • Bugfix: requests might hang when using the “limit_rate”, “sendfile_max_chunk”, “limit_req” directives, or the $r->sleep() embedded perl method with subrequests.
  • Bugfix: in the ngx_http_slice_module.

nginx 1.11.12

Changes

  • Bugfix: nginx might hog CPU; the bug had appeared in 1.11.11.

nginx 1.11.11

Changes

  • Feature: the “worker_shutdown_timeout” directive.
  • Feature: vim syntax highlighting scripts improvements.
  • Bugfix: a segmentation fault might occur in a worker process if the $limit_rate variable was set to an empty string.
  • Bugfix: the “proxy_cache_background_update”, “fastcgi_cache_background_update”, “scgi_cache_background_update”, and “uwsgi_cache_background_update” directives might work incorrectly if the “if” directive was used.
  • Bugfix: a segmentation fault might occur in a worker process if number of large_client_header_buffers in a virtual server was different from the one in the default server.
  • Bugfix: in the mail proxy server.

nginx 1.11.10

Changes

  • Change: cache header format has been changed, previously cached responses will be invalidated.
  • Feature: support of “stale-while-revalidate” and “stale-if-error” extensions in the “Cache-Control” backend response header line.
  • Feature: the “proxy_cache_background_update”, “fastcgi_cache_background_update”, “scgi_cache_background_update”, and “uwsgi_cache_background_update” directives.
  • Feature: nginx is now able to cache responses with the “Vary” header line up to 128 characters long (instead of 42 characters in previous versions).
  • Feature: the “build” parameter of the “server_tokens” directive.
  • Bugfix: “[crit] SSL_write() failed” messages might appear in logs when handling requests with the “Expect: 100-continue” request header line.
  • Bugfix: the ngx_http_slice_module did not work in named locations.
  • Bugfix: a segmentation fault might occur in a worker process when using AIO after an “X-Accel-Redirect” redirection.
  • Bugfix: reduced memory consumption for long-lived requests using gzipping.

nginx 1.11.9

Changes

  • Bugfix: nginx might hog CPU when using the stream module; the bug had appeared in 1.11.5.
  • Bugfix: EXTERNAL authentication mechanism in mail proxy was accepted even if it was not enabled in the configuration.
  • Bugfix: a segmentation fault might occur in a worker process if the “ssl_verify_client” directive of the stream module was used.
  • Bugfix: the “ssl_verify_client” directive of the stream module might not work.
  • Bugfix: closing keepalive connections due to no free worker connections might be too aggressive.
  • Bugfix: an incorrect response might be returned when using the “sendfile” directive on FreeBSD and macOS; the bug had appeared in 1.7.8.
  • Bugfix: a truncated response might be stored in cache when using the “aio_write” directive.
  • Bugfix: a socket leak might occur when using the “aio_write” directive.

nginx 1.11.8

Changes

  • Feature: the “absolute_redirect” directive.
  • Feature: the “escape” parameter of the “log_format” directive.
  • Feature: client SSL certificates verification in the stream module.
  • Feature: the “ssl_session_ticket_key” directive supports AES256 encryption of TLS session tickets when used with 80-byte keys.
  • Feature: vim-commentary support in vim scripts.
  • Bugfix: recursion when evaluating variables was not limited.
  • Bugfix: in the ngx_stream_ssl_preread_module.
  • Bugfix: if a server in an upstream in the stream module failed, it was considered alive only when a test connection sent to it after fail_timeout was closed; now a successfully established connection is enough.
  • Bugfix: nginx/Windows could not be built with 64-bit Visual Studio.
  • Bugfix: nginx/Windows could not be built with OpenSSL 1.1.0.

nginx 1.11.7

Changes

  • Change: now in case of a client certificate verification error the $ssl_client_verify variable contains a string with the failure reason, for example, “FAILED:certificate has expired”.
  • Feature: the $ssl_ciphers, $ssl_curves, $ssl_client_v_start, $ssl_client_v_end, and $ssl_client_v_remain variables.
  • Feature: the “volatile” parameter of the “map” directive.
  • Bugfix: dependencies specified for a module were ignored while building dynamic modules.
  • Bugfix: when using HTTP/2 and the “limit_req” or “auth_request” directives client request body might be corrupted; the bug had appeared in 1.11.0.
  • Bugfix: a segmentation fault might occur in a worker process when using HTTP/2; the bug had appeared in 1.11.3.
  • Bugfix: in the ngx_http_mp4_module.
  • Bugfix: in the ngx_http_perl_module.

nginx 1.11.6

Changes

  • Change: format of the $ssl_client_s_dn and $ssl_client_i_dn variables has been changed to follow RFC 2253 (RFC 4514); values in the old format are available in the $ssl_client_s_dn_legacy and $ssl_client_i_dn_legacy variables.
  • Change: when storing temporary files in a cache directory they will be stored in the same subdirectories as corresponding cache files instead of a separate subdirectory for temporary files.
  • Feature: EXTERNAL authentication mechanism support in mail proxy.
  • Feature: WebP support in the ngx_http_image_filter_module.
  • Feature: variables support in the “proxy_method” directive.
  • Feature: the “http2_max_requests” directive in the ngx_http_v2_module.
  • Feature: the “proxy_cache_max_range_offset”, “fastcgi_cache_max_range_offset”, “scgi_cache_max_range_offset”, and “uwsgi_cache_max_range_offset” directives.
  • Bugfix: graceful shutdown of old worker processes might require infinite time when using HTTP/2.
  • Bugfix: in the ngx_http_mp4_module.
  • Bugfix: “ignore long locked inactive cache entry” alerts might appear in logs when proxying WebSocket connections with caching enabled.
  • Bugfix: nginx did not write anything to log and returned a response with code 502 instead of 504 when a timeout occurred during an SSL handshake to a backend.

nginx 1.11.5

Changes

  • Change: the –with-ipv6 configure option was removed, now IPv6 support is configured automatically.
  • Change: now if there are no available servers in an upstream, nginx will not reset number of failures of all servers as it previously did, but will wait for fail_timeout to expire.
  • Feature: the ngx_stream_ssl_preread_module.
  • Feature: the “server” directive in the “upstream” context supports the “max_conns” parameter.
  • Feature: the –with-compat configure option.
  • Feature: “manager_files”, “manager_threshold”, and “manager_sleep” parameters of the “proxy_cache_path”, “fastcgi_cache_path”, “scgi_cache_path”, and “uwsgi_cache_path” directives.
  • Bugfix: flags passed by the –with-ld-opt configure option were not used while building perl module.
  • Bugfix: in the “add_after_body” directive when used with the “sub_filter” directive.
  • Bugfix: in the $realip_remote_addr variable.
  • Bugfix: the “dav_access”, “proxy_store_access”, “fastcgi_store_access”, “scgi_store_access”, and “uwsgi_store_access” directives ignored permissions specified for user.
  • Bugfix: unix domain listen sockets might not be inherited during binary upgrade on Linux.
  • Bugfix: nginx returned the 400 response on requests with the “-” character in the HTTP method.

nginx 1.11.4

Changes

  • Feature: the $upstream_bytes_received variable.
  • Feature: the $bytes_received, $session_time, $protocol, $status, $upstream_addr, $upstream_bytes_sent, $upstream_bytes_received, $upstream_connect_time, $upstream_first_byte_time, and $upstream_session_time variables in the stream module.
  • Feature: the ngx_stream_log_module.
  • Feature: the “proxy_protocol” parameter of the “listen” directive, the $proxy_protocol_addr and $proxy_protocol_port variables in the stream module.
  • Feature: the ngx_stream_realip_module.
  • Bugfix: nginx could not be built with the stream module and the ngx_http_ssl_module, but without ngx_stream_ssl_module; the bug had appeared in 1.11.3.
  • Feature: the IP_BIND_ADDRESS_NO_PORT socket option was not used; the bug had appeared in 1.11.2.
  • Bugfix: in the “ranges” parameter of the “geo” directive.
  • Bugfix: an incorrect response might be returned when using the “aio threads” and “sendfile” directives; the bug had appeared in 1.9.13.

Current packages

CodeIT continues to build this software. CodeIT aims to publish each upstream update on the day of its release, and CVE fixes first, on the same day. For the current versions and the install steps, read the Apache HTTP/3 install guide, the NGINX HTTP/3 and Brotli install guide and the OpenSSL with QUIC guide. To add the repository, read the repository setup page.

Reader questions and answers

The comments below come from the release posts in the list above. They keep their original dates. Many of them have answers about install errors, dependencies and upgrades that are still useful.

NGINX 1.15.0 mainline built against OpenSSL 1.1.1-pre2 with TLS 1.3 draft 23 and brotli for Red Hat Enterprise Linux and CentOS

NGINX 1.15.0-1 mainline-version, built statically against OpenSSL 1.1.1-pre2 and ngx cache purge. TLS 1.3 draft 23 support added. TLS 1.3 draft 23 works with current versions of Google Chrome and Mozilla Firefox. Links:

Alternatively, feel free to use our CentOS/RHEL repository.

RPM files of this release:

  • EL6 x86_64: nginx-1.15.0-1.el6.codeit.x86_64.rpm
  • EL7 x86_64: nginx-1.15.0-1.el7.codeit.x86_64.rpm
  • SRPM: nginx-1.15.0-1.el6.codeit.src.rpm, nginx-1.15.0-1.el7.codeit.src.rpm