> On Jul 12, 2020, at 3:08 PM, Ian Hobson <[email protected]> wrote:
> 
> This is not correct, see 
> https://nginx.org/en/docs/http/ngx_http_core_module.html#server where it says
> 
> Syntax:       server { ... }
> Default:      —
> Context:      http
> Sets configuration for a virtual server. There is no clear separation between 
> IP-based (based on the IP address) and name-based (based on the “Host” 
> request header field) virtual servers. Instead, the listen directives 
> describe all addresses and ports that should accept connections for the 
> server, and the server_name directive lists all server names.
> 
> So the ports are defined in the listen directive, and the server names in the 
> server_name directive.
> 
> Your approach of multiple https servers works fine on my kit with the 
> approach you have taken.
> 
> Suggest there may be a typo in your configuration - try
> 
> sudo nginx -t
> 
> to prove both servers are loaded.


They are both on the same server.  Same IP.  With the same port number, there’s 
nothing deciphering between the two other than server_name.  Hence using 
server_name as the forward.  I don’t even know how one could use port number as 
the request.  

If you look at the example he posted, there was no default.   


Cheers, Bee




_______________________________________________
nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to