I have manually installed Ghost on a VPS, with MySQL and Nginx.
Set up is fine and I can access my page, but cannot set up SSL.
Would much appreciate the help. I am just starting with self-hosting and have already pushed my limits to get here!
Below the error log:
Message: Command failed: /bin/sh -c sudo -S -p '#node-sudo-passwd#' /etc/letsencrypt/acme.sh --issue --home /etc/letsencrypt --server letsencrypt --domain ghost.anant1.net --webroot /home/anant1/ghost/system/nginx-root --reloadcmd "nginx -s reload" --accountemail abargel@mailbox.org
[Tue May 24 13:36:29 UTC 2022] ghost.anant1.net:Verify error:199.241.137.220: Invalid response from http://ghost.anant1.net/.well-known/acme-challenge/gyfc1yfhiwaptkyeuvavjua5ly-zns_nwy-7o53ovkw/: 404
[Tue May 24 13:36:29 UTC 2022] Please add '--debug' or '--log' to check more details.
[Tue May 24 13:36:29 UTC 2022] See: https://github.com/acmesh-official/acme.sh/wiki/How-to-debug-acme.sh
[Tue May 24 13:36:24 UTC 2022] Using CA: https://acme-v02.api.letsencrypt.org/directory
[Tue May 24 13:36:24 UTC 2022] Single domain='ghost.anant1.net'
[Tue May 24 13:36:24 UTC 2022] Getting domain auth token for each domain
[Tue May 24 13:36:26 UTC 2022] Getting webroot for domain='ghost.anant1.net'
[Tue May 24 13:36:26 UTC 2022] Verifying: ghost.anant1.net
[Tue May 24 13:36:26 UTC 2022] Pending, The CA is processing your order, please just wait. (1/30)
Exit code: 1
--------------- stdout ---------------
[Tue May 24 13:36:24 UTC 2022] Using CA: https://acme-v02.api.letsencrypt.org/directory
[Tue May 24 13:36:24 UTC 2022] Single domain='ghost.anant1.net'
[Tue May 24 13:36:24 UTC 2022] Getting domain auth token for each domain
[Tue May 24 13:36:26 UTC 2022] Getting webroot for domain='ghost.anant1.net'
[Tue May 24 13:36:26 UTC 2022] Verifying: ghost.anant1.net
[Tue May 24 13:36:26 UTC 2022] Pending, The CA is processing your order, please just wait. (1/30)
--------------- stderr ---------------
[Tue May 24 13:36:29 UTC 2022] ghost.anant1.net:Verify error:199.241.137.220: Invalid response from http://ghost.anant1.net/.well-known/acme-challenge/gyfc1yfhiwaptkyeuvavjua5ly-zns_nwy-7o53ovkw/: 404
[Tue May 24 13:36:29 UTC 2022] Please add '--debug' or '--log' to check more details.
[Tue May 24 13:36:29 UTC 2022] See: https://github.com/acmesh-official/acme.sh/wiki/How-to-debug-acme.sh
What I wrote isn’t strictly correct. If it’s a new certificate it’ll come from ZeroSSL by default. However, certificates issued before August 2021 will continue to use Let’s Encrypt.
Ghost uses ACME to issue an SSL certificate. The default CA changed last year.
Oh, right… So, I just tried, and it got rid of the initial “command fail” message, but still, I get this:
root@anant1:/home/anant1/ghost# /etc/letsencrypt/acme.sh --server letsencrypt --issue --home /etc/letsencrypt --server letsencrypt --domain ghost.anant1.net --webroot /home/anant1/ghost/system/nginx-root --reloadcmd "nginx -s reload" --accountemail abargel@mailbox.org
[Tue May 24 19:36:14 UTC 2022] Using CA: https://acme-v02.api.letsencrypt.org/directory
[Tue May 24 19:36:14 UTC 2022] Single domain='ghost.anant1.net'
[Tue May 24 19:36:14 UTC 2022] Getting domain auth token for each domain
[Tue May 24 19:36:15 UTC 2022] Getting webroot for domain='ghost.anant1.net'
[Tue May 24 19:36:15 UTC 2022] Verifying: ghost.anant1.net
[Tue May 24 19:36:16 UTC 2022] Pending, The CA is processing your order, please just wait. (1/30)
[Tue May 24 19:36:20 UTC 2022] ghost.anant1.net:Verify error:199.241.137.220: Invalid response from http://ghost.anant1.net/.well-known/acme-challenge/i3a54hWo2TA107lMlPgSODagsDzenXtQ5HGUd1zRSQc: 502
[Tue May 24 19:36:20 UTC 2022] Please add '--debug' or '--log' to check more details.
[Tue May 24 19:36:20 UTC 2022] See: https://github.com/acmesh-official/acme.sh/wiki/How-to-debug-acme.sh
Oh, you’re right. It was available this afternoon, when I posted the question.
I ran “ghost setup” again just now, ghost is indeed running, but I get 502 also for the ghost admin page.
Well, I guess I am going to start over. Apparently, I have reverse proxy issues for not setting things up in the right order at the beginning. Thank you for helping!!