Website/Server no longer working after installing SSL

Keywords: WordPress + NGINX + SSL - AWS - Technical issue - Secure Connections (SSL/HTTPS)

bndiagnostic ID: 282188dc-29c3-655e-cafa-acc1f9ca4e3e

bndiagnostic output:

? Nginx: Found possible issues
? Connectivity: Found possible issues
? Processes: Found possible issues
https://docs.bitnami.com/installer/infrastructure/nginx/troubleshooting/
https://docs.bitnami.com/general/faq/administration/use-firewall/

bndiagnostic failure reason: The suggested guides are not related with my issue

Description:
Hello,

I followed this guide Generate and Install a Let's Encrypt SSL Certificate for a Bitnami Application to install SSL certificate but now the website is dead. I cannot start any Bitnami Services anymore

Mar 16 13:02:30 ip-172-31-16-229 systemd[1]: bitnami.service: Control process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- An ExecStart= process belonging to unit bitnami.service has exited.
-- 
-- The process' exit code is 'exited' and its exit status is 1.
Mar 16 13:02:30 ip-172-31-16-229 systemd[1]: bitnami.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- The unit bitnami.service has entered the 'failed' state with result 'exit-code'.
Mar 16 13:02:30 ip-172-31-16-229 systemd[1]: Failed to start LSB: bitnami init script.
-- Subject: A start job for unit bitnami.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support

Hi @Mad2kx ,

The error in clear and the diagnostic tool warned you about it


The Nginx configuration has errors:

nginx: [emerg] cannot load certificate "/opt/bitnami/nginx/conf/bitnami/certs/server.crt": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/opt/bitnami/nginx/conf/bitnami/certs/server.crt','r') error:2006D080:BIO routines:BIO_new_file:no such file) nginx: configuration file /opt/bitnami/nginx/conf/nginx.conf test failed

Please check the configuration.


You generated wrong symlinks using DOMAIN instead of your real domain and that’s why NGINX is failing to run

nginx/conf/bitnami/certs:
total 16
drwxrwxr-x 2 bitnami root 4096 Mar 16 12:47 .
drwxrwxr-x 3 bitnami root 4096 Mar 11 04:55 ..
lrwxrwxrwx 1 root    root   48 Mar 16 12:47 server.crt -> /opt/bitnami/letsencrypt/certificates/DOMAIN.crt

Please recreate the symlinks using the correct domain and restart NGINX later

Hi @jota thanks for the response. I had to redo the ssl/lego setup 4 times over and over again until it worked. I am not sure what happened the first times but now it is working.

I want to create a subdomain on another AWS instance/different IP Address. What is the best practice to follow here?

Kind regards

Same here I did everything over and over with the same results, I would get the website running but it wouldn’t be secure or the website would just break and not connect to server, the only way I was able to get it to work is run everything as root and bingo it worked.

Hi @james.wildart,

This depends on the DNS host but normally it’s possible to create an A record and point it to the IP of the subdomain. The following guide is for AWS:

https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-routing-traffic-for-subdomains.html

Best regards,
Michiel

@michiel thanks for your response.

We created a subdomain and pointed the A Record to the other AWS Instance. It now shows invalid SSL Certificate. Do I need to run Lego on the Subdomain?

Regards,

Mad2kx

Hi @Mad2kx,

Yes you would need to configure a certificate for that subdomain.

Best regards,
Michiel

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