SSL_ERROR_BAD_CERT_DOMAIN with multiple domains
nginx-forum at forum.nginx.org
Sat Jun 22 20:01:40 UTC 2019
I have two domains:
(1) is under my control (I own the domain) and I manage the certs (Let's
If I visit "https://myvery.owndomain.com" I'm greeted by the "Welcome to
Nginx!" landing page. (I use nginx as a reverse proxy only.)
(2) is a DDNS that Synology manages and it also has certs by LE (managed by
I have a Mac Mini running the "main" Nginx server and a bunch of other
services. (1) points to theses services on the Mini. The IP of the mini is
(2) points to a NAS that has it's own Nginx to handle, among other things,
the LE certs. This machine runs on IP 192.168.11.10.
Without any settings in the "main" nginx, I can't use (2) because in my
router (EdgeRouter X) both :80 and :443 point to the Mini (192.168.13.10).
So I need to add two new server blocks in my config so that:
If I visit "http://domain.synology.me" (port 80) that redirects me to
If I visit "https://domain.synology.me" (port 443) that redirects me to
I've managed to get part of the way. But I'm getting SSL errors like for
instance: "SSL_read() failed (SSL: error:14094412:SSL
routines:ssl3_read_bytes:sslv3 alert bad certificate:SSL alert number 42)
while waiting for request, client: 192.168.13.1, server: 0.0.0.0:443"
What am I doing wrong?
Here's my current config:
Posted at Nginx Forum: https://forum.nginx.org/read.php?2,284630,284630#msg-284630
More information about the nginx