Hi,
I tried to set up a SSL for a subdomain (www) and redirect to https://mydomain.com.
I followed the documentation
https://ghost.org/docs/ghost-cli/?_ga=2.118653449.1825965484.1682159099-1592938179.1682159099#knowledgebase
I already set an A record for www, pointing to the site host.
After I ran $ ghost setup nginx ssl
I got
✖ Setting up SSL
One or more errors occurred.
1) CliError
Message: Failed to restart Nginx.
Debug Information:
OS: Ubuntu, v22.04.1 LTS
Node Version: v16.17.0
Ghost Version: 5.43.0
Ghost-CLI Version: 1.24.0
Environment: production
Command: 'ghost setup nginx ssl'
I checked on /etc/nginx/sites-available and found both .com.conf and .com-ssl.conf for my subdomain that I just configed.
I edited both as instructed .
When I ran sudo nginx-t
, I got
nginx: [emerg] cannot load certificate "/etc/letsencrypt/www.mydomain.com/fullchain.cer": BIO_new_file() failed (SSL: error:80000002:system library::No such file or directory:calling fopen(/etc/letsencrypt/www.mydomain.com/fullchain.cer, r) error:10000080:BIO routines::no such file)
I don’t know if I should delete these two new conf for my subdomain and retry ghost setup nginx ssl, or how should I fix this as my site now working only with https://mydomain.com and not with www.
Thank you for your time and support.
Please help!