July 12, 2020 08:42PM
> On Jul 12, 2020, at 3:08 PM, Ian Hobson <hobson42@gmail.com> 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
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Multiple SSL web sites with nginx

dorafmon July 12, 2020 09:43AM

Re: Multiple SSL web sites with nginx

daBee July 12, 2020 12:44PM

Re: Multiple SSL web sites with nginx

Ian Hobson July 12, 2020 03:10PM

Re: Multiple SSL web sites with nginx

daBee July 12, 2020 08:42PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 258
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready