how to enable http2 for two server hosted on the same IP

A. Schulze sca at
Thu Jan 4 15:53:48 UTC 2018


> Hi All,
> If I use
> server {
> 	listen       443  accept_filter=dataready ssl http2;
> 	}
> server {
> 	listen  443 http2 sndbuf=512k;
> 	}
> I'll get error
>  duplicate listen options for
> I know it's caused by http2 in server 2.

probably you're wrong. The error is to specify sndbuf in the second server.

     The listen directive can have several additional parameters  
specific to socket-related system calls.
     These parameters can be specified in any listen directive, but  
only once for a given address:port pair.

"but only once for a given address:port pair" is the point!

multiple options: ssl, http2, spdy, proxy_protocol
single options: setfib, fastopen, backlog, ...


More information about the nginx mailing list