I have Docker I am running “N” number of containers for development for those containers I am running under Nginx-proxy container for domain naming.
I am using this image for proxy “jwilder/nginx-proxy”
my problem is I installed SSL for one of my dev server(ex:test1.site.net) that is working fine but when I installed for another container(test2.site.net) it’s installed properly but when I am accessing through the browser it showing error like this
“This server could not prove that it is test2.site.net; its security certificate is from test1.site.net. This may be caused by a misconfiguration or an attacker intercepting your connection.”
You can use dns-01 - validation. But this is not the problem, because test1.site.net is working. Looks like a problem with the local configuration, so test2.site.net gets the wrong certificate.
@bhargav4108 why are your containers issuing their own certificates if you are using nginx-proxy? Shouldn’t nginx-proxy be issuing certificates for each of your containers?
if you mount a volume of the underlying linux system (e.g. ubuntu) you should mount the etc/letsencrypt volume which will let you access certificates that the host has obtained
Otherwise you can insert the certificates you have obtained as environmental variables
the way you do it it’s up to you but you do need to keep that in mind. Containers are not virtual machines therefore persistence is not a an attribute that docker containers have
Thanks for your information, yes i need tutorials. i am begginer for docker can you please share.
I am not using docker for production, i started for developement servers.