Enable HTTP2 in one of several name-based servers

itpp2012 nginx-forum at forum.nginx.org
Thu Jun 23 08:35:45 UTC 2016


Valentin V. Bartenev Wrote:
-------------------------------------------------------
> > Is it possible to enable http2 in only one of several name-based
> servers?
> > 
> [..]
> 
> No, it's not possible.

Would it be a big (api) change to add a server block session flag?

ngx_http_v2_init(ngx_event_t *rev)
...
if ( h2scf.no_http2 ) { /* example server block flag */
    ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "http2 disabled in server
context");
            ngx_http_close_connection(c);
            return;
        }
...
    c->log->action = "processing HTTP/2 connection";

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,267795,267801#msg-267801



More information about the nginx mailing list