Welcome! Log In Create A New Profile

Advanced

SSL_ERROR_BAD_CERT_DOMAIN with multiple domains

June 22, 2019 04:01PM
I have two domains:

(1) myvery.owndomain.com
(2) domain.synology.me

(1) is under my control (I own the domain) and I manage the certs (Let's Encrypt).
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 Synology).

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 192.168.13.10.

(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 "http://domain.synology.me:5000"
and
If I visit "https://domain.synology.me" (port 443) that redirects me to "https://domain.synology.me:5001"

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: https://gist.github.com/BeyondEvil/e246d1725438989815272ac96fd1a767

Thanks!
Subject Author Posted

SSL_ERROR_BAD_CERT_DOMAIN with multiple domains

BeyondEvil June 22, 2019 04:01PM

Re: SSL_ERROR_BAD_CERT_DOMAIN with multiple domains

Francis Daly June 26, 2019 04:28AM

Re: SSL_ERROR_BAD_CERT_DOMAIN with multiple domains

BeyondEvil July 06, 2019 07:59AM

Re: SSL_ERROR_BAD_CERT_DOMAIN with multiple domains

Francis Daly July 10, 2019 06:26PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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