【问题标题】:Deploying Ghost One-Click droplet on Digital Ocean: Exit code 1 when verifying domain在 Digital Ocean 上部署 Ghost One-Click Droplet:验证域时退出代码 1
【发布时间】:2020-04-21 19:40:58
【问题描述】:

我正在尝试跟随 DigitalOceans intructions on creating a one-click droplet 为我的网站设置一个幽灵 cms。

我在 Netlify 上建立了我的网站,并让 Netlify 管理 dns。当 Netlify 管理 dns 时,它看起来像是在 Netlify 上自动设置了 ssl。 域名注册商是 Namecheap。

当我 ssh 到我的 droplet 时,我得到下面的输出,访问 https://example.com/ghost/ 会出现 404 错误,但我仍然可以访问 https://example.com

~ % ssh root@111.111.1.11
The authenticity of host '111.111.1.11 (111.111.1.11)' can't be established.
ECDSA key fingerprint is SHA111:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '111.111.1.11' (ECDSA) to the list of known hosts.
root@111.111.1.11's password: 

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.


-------------------------------------------------------------------------------

Configuring DigitalOcean 1-Click Ghost installation.

Please wait a minute while your 1-Click is configured. 

Once complete, you are encouraged to run mysql_secure_installation to ready
your server for production. Passwords have been saved to:

    root/.digitalocean_password

-------------------------------------------------------------------------------


Ensuring Ghost-CLI is up-to-date...
+ sudo npm i -g ghost-cli@latest
/usr/bin/ghost -> /usr/lib/node_modules/ghost-cli/bin/ghost
+ ghost-cli@1.13.1
added 59 packages from 29 contributors, removed 11 packages and updated 48 packages in 16.313s

Ghost will prompt you for two details:

1. Your domain
 - Add an A Record -> 111.111.1.11 & ensure the DNS has fully propagated
 - Or alternatively enter http://111.111.1.11
2. Your email address (only used for SSL)

Press enter when you're ready to get started!


+ sudo chown -R ghost-mgr:ghost-mgr /home/ghost-mgr/.config
✔ Checking system Node.js version
✔ Checking logged in user
✔ Checking current folder permissions
✔ Checking operating system compatibility
✔ Checking for a MySQL installation
✔ Checking memory availability
✔ Checking for latest Ghost version
✔ Setting up install directory
✔ Downloading and installing Ghost v3.13.4
✔ Finishing install process
? Enter your blog URL: https://example.com
✔ Configuring Ghost
✔ Setting up instance
+ sudo useradd --system --user-group ghost
+ sudo chown -R ghost:ghost /var/www/ghost/content
✔ Setting up "ghost" system user
ℹ Setting up "ghost" mysql user [skipped]
✔ Creating nginx config file at /var/www/ghost/system/files/example.com.conf
+ sudo ln -sf /var/www/ghost/system/files/example.com.conf /etc/nginx/sites-available/example.com.conf
+ sudo ln -sf /etc/nginx/sites-available/example.com.conf /etc/nginx/sites-enabled/example.com.conf
+ sudo nginx -s reload
✔ Setting up Nginx
? Enter your email (For SSL Certificate) myemail@outlook.com
+ sudo mkdir -p /etc/letsencrypt
+ sudo ./acme.sh --install --home /etc/letsencrypt
+ sudo /etc/letsencrypt/acme.sh --issue --home /etc/letsencrypt --domain example.com --webroot /var/www/ghost/system/nginx-root --reloadcmd "nginx -s reload" --accountemail myemail@outlook.com
✖ Setting up SSL
✔ Creating systemd service file at /var/www/ghost/system/files/ghost_example-com.service
+ sudo ln -sf /var/www/ghost/system/files/ghost_example-com.service /lib/systemd/system/ghost_example-com.service
+ sudo systemctl daemon-reload
✔ Setting up Systemd
+ sudo systemctl is-active ghost_example-com
+ sudo systemctl start ghost_example-com
+ sudo systemctl is-enabled ghost_example-com
+ sudo systemctl enable ghost_example-com --quiet
✔ Starting Ghost
One or more errors occurred.

1) ProcessError

Message: Command failed: /bin/sh -c sudo -S -p '#node-sudo-passwd#'  /etc/letsencrypt/acme.sh --issue --home /etc/letsencrypt --domain example.com --webroot /var/www/ghost/system/nginx-root --reloadcmd "nginx -s reload" --accountemail myemail@outlook.com
[Tue Apr 21 18:30:16 UTC 2020] example.com:Verify error:Invalid response from https://example.com/.well-known/acme-challenge/vsRL-FT-yUeK0ntPgkXjl2-4vcYw8FV213estE4b1as [206.189.73.52]: 
[Tue Apr 21 18:30:16 UTC 2020] Please add '--debug' or '--log' to check more details.
[Tue Apr 21 18:30:16 UTC 2020] See: https://github.com/Neilpang/acme.sh/wiki/How-to-debug-acme.sh

[Tue Apr 21 18:30:11 UTC 2020] Create account key ok.
[Tue Apr 21 18:30:11 UTC 2020] Registering account
[Tue Apr 21 18:30:12 UTC 2020] Registered
[Tue Apr 21 18:30:12 UTC 2020] ACCOUNT_THUMBPRINT='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
[Tue Apr 21 18:30:12 UTC 2020] Creating domain key
[Tue Apr 21 18:30:12 UTC 2020] The domain key is here: /etc/letsencrypt/example.com/example.com.key
[Tue Apr 21 18:30:12 UTC 2020] Single domain='example.com'
[Tue Apr 21 18:30:12 UTC 2020] Getting domain auth token for each domain
[Tue Apr 21 18:30:13 UTC 2020] Getting webroot for domain='example.com'
[Tue Apr 21 18:30:13 UTC 2020] Verifying: example.com

Exit code: 1


Debug Information:
    OS: Ubuntu, v18.04.3 LTS
    Node Version: v10.16.3
    Ghost Version: 3.13.4
    Ghost-CLI Version: 1.13.1
    Environment: production
    Command: 'ghost install --auto --db=mysql --dbhost=localhost --dbname=ghost_production --dbuser=ghost --dbpass=bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb --dir=/var/www/ghost --start'

Additional log info available in: /home/ghost-mgr/.ghost/logs/ghost-cli-debug-2020-04-21T18_30_42_032Z.log

Try running ghost doctor to check your system for known issues.

You can always refer to https://ghost.org/docs/api/ghost-cli/ for troubleshooting.

------------------------------------------------------------------------------

For any further commands, please switch to the ghost-mgr user to manage Ghost.

    sudo -i -u ghost-mgr

------------------------------------------------------------------------------

【问题讨论】:

    标签: digital-ocean netlify ghost-blog


    【解决方案1】:

    我做了一些搜索,从这个线程看来,您需要在另一端设置 SSL,而不是使用来自 Netlify 的 SSL: https://community.netlify.com/t/how-to-do-dns-ssl-for-sub-domain-that-doesnt-run-on-netlify/5498/11

    【讨论】:

    • 谢谢!有时间我会研究一下。
    猜你喜欢
    • 2020-10-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-03-06
    • 1970-01-01
    • 1970-01-01
    • 2017-01-25
    相关资源
    最近更新 更多