Can't reload NGINX (nginx: [emerg] BIO_new_file ("/etc/nginx/etc/ssl/certs/...") failed )

  • Hello Guys,


    Since it's my 1st post on the board, I'd like to thank all devs for their hard work, openmediavault is by far the best NAS solution I've ever used, although it can be tricky at times ;)


    After renewing my letsencrypt certificate I found myself in an odd situation where nginx is apparently trying to refer to previous certificate, however, in a location that does not exist (/etc/nginx/etc/ssl/certs/).


    The aforementioned renewal did not go as smooth as it should, after the first try I ended up having an incorrect pair of .crt and .key files, so I removed both and gave letsencrypt another try which was successful this time. After that I restarted nginx without a problem and everything was working fine for 3 days (in fact it still does, as I did not restart nginx, but only tried reloading it to no avail).


    The error that I get while trying to reload nginx is as follows, the filename of the missing file is exactly the same as that of previous certificate which was about to expire, the file is no longer present as I removed it.



    I've checked nginx configuration files and they look alright, I also tried creating a new one using omv-mkconf, it didn't help either. It seems to me that a reference to the old certificate remains in one of the files (but why is the location incorrect?) which causes the problem, I'll be most grateful for pointing myself in the right direction.


    Some details in case they're needed:
    OMV Version: 3.0.99
    OMV-letsencrypt plugin version: 3.4.5
    nginx plugin version: 3.0.11



    Thank you!

  • I've managed to solve my problem, apparently one of the old config files was still referring to the previous certificate. It's surprising though, that this error did not come up while restarting nginx after cert renewal.


    I'm no dev, but to me it would seem more reasonable to give nginx configuration files .conf extension to avoid having files with .save or any other included by the default config. Just thinking out loudly, not that I'd want to teach anyone :)

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!