我正试图按照DigitalOceans的指示创建一个一键液滴,以便为我的网站设置一个ghost cms。
我在Netlify上建立了我的网站,并让Netlify管理dns。当Netlify管理dns时,它看起来像是在Netlify上自动设置ssl。域名注册商是Namecheap。
当我ssh到我的液滴时,我得到了下面的输出,访问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
------------------------------------------------------------------------------
我做了一些搜索,从这个线程中可以看出,您需要在另一端设置SSL,而不是使用Netlify中的SSL:https://community.netlify.com/t/how-to-do-dns-ssl-for-sub-domain-that-doesnt-run-on-netlify/5498/11