Normally, when Nginx tries to read a certificate which does not exist, it will exit and throw an error.

Can I define any fall-back certificate in case the primary certificate does not exist?


No. Why would your key not exist?

| improve this answer | |
  • I am just automating the generation with docker-compose and certbot, where the latter needs the first (with my custom automated configuration). The first cannot start with no certificate according to my confi. – Mohammed Noureldin Jan 6 '18 at 0:52
  • 1
    Best work out how to add certbot as a dependency / blocker before Nginx starts. You could ask another question about that if you need help - I can't help with Docker. – Tim Jan 6 '18 at 0:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.