0

I'm trying to create a development enviroment using nginx, mysql and php. I want to have a self signed SSL certificate configured because in productions I'll use ssl connections as well.

For php and mysql I had no problems, but for nginx and struggling to make it work. I'm using MarvAmBass/docker-nginx-ssl-secure image (https://github.com/MarvAmBass/docker-nginx-ssl-secure) but when accessing the site I get the SEC_ERROR_UNKNOWN_ISSUER error in Firefox (invalid ssl certificate).

I've replaced the CN var in the command to create the self certificate but doesn't seem to affect.

I don't know if maybe there's another image I can use (I'm pretty new to the docker world).

Thanks in advance

petekaner
  • 8,071
  • 5
  • 29
  • 52
  • Is your browser running from a container, or from the docker host? In the latter case, it should be trivial to accept the certificate in Firefox (or perform explicit setup beforehand: https://gist.github.com/iwazaru/579b547cc04f205b929d32e4f243d4f9) – Timir May 03 '18 at 05:07
  • from the docker host. But if I need to add the certificate to firefox I will need to do it everytime the container is recreated wouldn't I? – petekaner May 03 '18 at 10:29
  • Also see https://stackoverflow.com/a/26181780/1110636 – Timir May 03 '18 at 12:52

1 Answers1

0

If the certificate is not authorized by the valid CA(Certificate Authority), then you will notice SEC_ERROR_UNKNOWN_ISSUER on Mozilla. It is recommended to use the certificates provided by your CA(Certificate Authority).