-
Hello all, I've setup nginxproxy for 2 containers, one of which is using SSL. When going to https://dnsname it loads fine, when using https://ipaddress it gives ERR_SSL_PROTOCOL_ERROR. I need to use the IP due to DNS complications at one of our other locations. dnsname.key and dnsname.crt exist in /etc/nginx/certs/ and in the target container Both the IP and the name show as server_name's on
I've been trying for a few days and cannot work out why it's working when I use the name but not the IP. Anyone have a clue or is it a bug? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi. Have your tried to also mount the certificate and private key as |
Beta Was this translation helpful? Give feedback.
A bit more on this, I managed to fix it.
Firstly despite the
VIRTUAL_HOST
declaring the IP being used to reach it along with the certificate inCERT_NAME
. nginxproxy uses the default.crt. If it doesn't exist, then you straight up get ERR_SSL_PROTOCOL_ERROR blocked.So I generated a new SSL certificate. I took a carpet bombing approach, adding the DNS name, the IP used to reach it and a whole range of docker IP's as that's what comes up as the REMOTE_ADDR and SERVER_ADDR's via PHP. I put a few docker IP's in as they may change.
I then made that .crt the new marty.crt and default.crt and rebooted nginxproxy. Once the new certificate was installed on the end user devices the connection is ac…