Nginx: [emerg] cannot load certificate

Keywords: WordPress + NGINX + SSL - AWS - Technical issue - Secure Connections (SSL/HTTPS)
bnsupport ID: 40d56ada-ba60-dc62-2a49-8c681d40e21e
Description:
Hi I try to install SSL with lets encrypt and I cant.
thats the error.

nginx: [emerg] cannot load certificate “/opt/bitnami/nginx/conf/www.marinacast.com.crt”: BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen(’/opt/bitnami/nginx/conf/www.marinacast.com.crt’,‘r’) error:2006D080:BIO routines:BIO_new_file:no such file)
/opt/bitnami/nginx/scripts/ctl.sh: 77: [: Illegal number:
/opt/bitnami/nginx/scripts/ctl.sh : Nginx could not be started

Hi, @oyeandres.

Your certificate /opt/bitnami/nginx/conf/www.marinacast.com.crt seems to be a symlink to /opt/bitnami/letsencrypt/certificates/www.marinacast.com.crt, which doesn’t exist. Could you check that?

Regards,
Alejandro

Hi thank you very much for your reply.
I did not understand what to do? I’m actually a beginner and I don’t know much about the tutorials they have on bitnami

Create symlinks to your certificates running these commands:

sudo ln -s /opt/bitnami/letsencrypt/certificates/marinacast.com.crt /opt/bitnami/nginx/conf/marinacast.com.crt
sudo ln -s /opt/bitnami/letsencrypt/certificates/marinacast.com.key /opt/bitnami/nginx/conf/marinacast.com.key

Then edit your /opt/bitnami/nginx/conf/bitnami/bitnami.conf file and replace this:

	ssl_certificate	www.marinacast.com.crt;
	ssl_certificate_key	www.marinacast.com.key;

With this:

	ssl_certificate	marinacast.com.crt;
	ssl_certificate_key	marinacast.com.key;

Finally, restart your server:

sudo /opt/bitnami/ctlscript.sh restart nginx

It’s I live Thank you very much for your support…
but now SSL is not working. I am trying to enter the site https://marinacast.com and it shows a non-private connection message

The warning says:

The certificate is not trusted because it is self-signed.

Please, follow this guide to create and configure a Let’s Encrypt certificate: https://docs.bitnami.com/aws/how-to/generate-install-lets-encrypt-ssl/#alternative-approach

Regards,
Alejandro

Thank you very much fro you support I already create the Lets Encrypt Certificate. but, I cant do it run

I followed each of the steps.

my approach is b

Thanks for your support

Please submit a new Bitnami Support code.

Regards,
Alejandro

thanks Alejandro

fadef74b-7f21-19f1-7812-62fc51f4916d

Best
Andres

In your /opt/bitnami/nginx/conf/bitnami/bitnami.conf file, replace this:

ssl_certificate	marinacast.com.crt;
ssl_certificate_key	marinacast.com.key;

with this:

ssl_certificate      server.crt;
ssl_certificate_key  server.key;

Then, restart NGINX:

sudo /opt/bitnami/ctlscript.sh restart nginx

Let me know how it goes.

Regards,
Alejandro

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