I just changed my ghost URL and am now trying to generate a new SSL cert. I tried ghost setup ssl
but got this message:
Nginx config file does not exist, skipping SSL setup
ℹ Setting up SSL [skipped]
After my adventures in changing the URL, I’m scared to try anything. Any advice would be appreciated (for example, which config file is it referring to?).
Ghost-CLI version: 1.24.0
Ghost version: 5.47.2
EDIT: related: Update SSL certificate for a changed domain
I think I’ve managed to work around this by
-
installing Certbot (also had to install
apt install python3-certbot-nginx)
- generating a certificate with
sudo certbot certonly --nginx -d <new_domain>
- editing both
/etc/nginx/sites-available/AAA.conf
and /etc/nginx/sites-available/AAA-ssl.conf
to use the new server_name
, and editing /etc/nginx/sites-available/AAA-ssl.conf
to point to my new certificate and key (which were in /etc/letsencrypt/live/
, under different names). (I also renamed these files and recreated the symlinks in /etc/nginx/sites-enabled
, though I probably could’ve skipped this.)
- restart nginx
whew.