OPNsense Forum

Archive => 22.7 Legacy Series => Topic started by: muchacha_grande on October 19, 2022, 05:46:51 PM

Title: [SOLVED] NGINX Cannot load a new site certificate
Post by: muchacha_grande on October 19, 2022, 05:46:51 PM
Hi, I have a problem trying to create a new site on NGINX.
I read a couple of recent threads on NGINX but I think this is different.
When I create a new site using HTTPS I first create a self signed certificate for the purpose of testing the configuration, and the following error appears on the NGINX general log:

cannot load certificate "/usr/local/etc/nginx/key/www.xxxxxx.com.pem": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/usr/local/etc/nginx/key/www.xxxxxx.com.pem','r') error:2006D080:BIO routines:BIO_new_file:no such file)

I went to see the given directory and the specified file is not there. It seems that the plugin is not able to copy the certificate inside its directory to use it.

Thank you

EDIT:
after reading further a previous thread I found this:
https://forum.opnsense.org/index.php?topic=30656.msg147980#msg147980
So I tried the fix  and it worked fine, so the issue is solved. And everything in one post  ;D