Welcome! Log In Create A New Profile

Advanced

Re: Nginx not loading different certs on two hosts

Nikolaos Milas
December 11, 2020 06:46AM
On 10/12/2020 4:42 μ.μ., Maxim Dounin wrote:
> How do you test it? Note well that the second vhost is only
> available on port 443 via IPv6.
>> Finally, what is the best way to successfully listen (i.e. the suggested
>> way to configure the "listen" directives) to 80 and 443 ports on both
>> IPv4 and IPv6 on all hosts (each and every one of them)?
> The recommended approach is to list all relevant "listen"
> directives in all relevant servers.

Hi Maxim,

Thank you for your reply!

I used the listen directives as you suggested on both vhosts and then I
retried. After restarting nginx, both vhosts worked fine, both with http
and https!

Please note that with the initial config (as I had sent it), the second
vhost was in fact responding to IPv4 clients as well, (through the use
of ipv4-mapped ipv6 addresses). Actually, the second vhost used to work
ONLY with http.

When the second site was being accessed via https, it would produce an
SSL warning, and by checking the certificate details I could see that it
was the one used for the first vhost.

If I would ignore the security warning and accept the certificate, it
would continue, yet it would not load the expected page specified by the
URL but a 404 page.

So, for example, the URL:

http://site2.local.world.example.com/catalog/en

would work fine, but the URL:

https://site2.local.world.example.com/catalog/en

wouldn't load, either the correct cert or the page!

I couldn't find any associated error in vhost logs.

I haven't been able to understand the above described behavior! In any
case, everything works fine now!

Thanks again!

All the best,
Nick


_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Nginx not loading different certs on two hosts

Nikolaos Milas December 09, 2020 04:36PM

Re: Nginx not loading different certs on two hosts

Maxim Dounin December 10, 2020 09:44AM

Re: Nginx not loading different certs on two hosts

Nikolaos Milas December 11, 2020 06:46AM

Re: Nginx not loading different certs on two hosts

Maxim Dounin December 11, 2020 07:56PM

Re: Nginx not loading different certs on two hosts

Nikolaos Milas December 15, 2020 12:02PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 180
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