Virtual hosts sharing same port

Maxim Dounin mdounin at mdounin.ru
Mon Apr 16 13:32:09 UTC 2018


Hello!

On Mon, Apr 16, 2018 at 07:26:11AM +0000, Frank Liu wrote:

> Can I use different listen parameters for virtual hosts using the same
> port? Eg, one vh has “listen 443 ssl;” and the other one has “listen 443
> ssl h2;”

No.  Options like "ssl" and "h2" can be repeated multiple times to 
make configuring listening sockets more clear.  But whenever you 
set it or not in a given server{} block, the listening socket in 
question will have the option set as long as it is set in at least 
one "listen" directive.

-- 
Maxim Dounin
http://mdounin.ru/


More information about the nginx mailing list