BIO_new_file ../fullchain.pem failed no such file or directory

I keep getting this error:

Error while running nginx -c /etc/nginx/nginx.conf -t.

nginx: [emerg] BIO_new_file("/etc/letsencrypt/live/jira/fullchain.pem") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/etc/letsencrypt/live/jira/fullchain.pem','r') error:2006D080:BIO routines:BIO_new_file:no such file)
nginx: configuration file /etc/nginx/nginx.conf test failed

when I haven't created those files yet?

I tried with
certbot certonly --nginx -d example.com --email my@email.com --non-interactive --cert-name jira --agree-tos

but that error keeps coming up and will not let me create the certificates.

If I do it interactively with
certbot certonly

that works fine but I can't specify the certificate-name, and I do not want it to be example.com, I want it to be jira.

Any ideas?

Hi @munchine

then the error is expected. So your question is your solution - don't use a not existing file.

Cleanup your config, so nginx starts. Then try it again.

The solution to that is also very simple: don't use example.com as an option to certbot if you don't want to use that domain name.

It looks like you blindly copy/pasted an example from the internet without actually knowing what all the different options do. This is very bad! You should, before you hit enter, always verify you know what all the options actually do. In this case you should look up the function of the -d option in the certbot documentation.

Also:

Why would you try to use non-existing files in the first place?

I would urge you VERY STRONGLY to try to use a little bit more autodidacticism when it comes to following certain guides. This because it really seems you're blindly following a certain guide without actually understanding the reasons behind certain steps, what the effect of certain steps would be et cetera.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.