If I’m understanding right, this is an issue with getting Nginx working and not specific to Ghost? I found this article very helpful for setting up Nginx as a reverse proxy to serve Node websites. This will accept web requests on your server (80 for http and 443 for https) and “redirect” them to whichever service you specify. For example, you would listen on port 443 and proxy to localhost:3000 (if your ghost server is running on port 3000). Hope this helps!
This is a helpful article and I may indeed need to dive into this if I want to self-host Ghost more often.
However in this context, it’s literally supposed to be an “auto-magic” background operation that Digital Ocean handles for me, I wasn’t under the impression that I would even need to do as much troubleshooting as I have.
I thought it would be closer to Ghost Pro with a few extra steps (not that I would have to learn about server management)
I’m running into this issue too and came to Digital Ocean solely because of the 1-click install. I’ve only tried this install once with Digital Ocean but also 16 times over the past two days over on a Linode instance too. I’ve got a local TurnKey linux install of it on Proxmox running without any issues but I don’t have ssl set up for the local install. In every instance that it fails, no matter the host, it’s been due to Nginx. Nginx is actually running but Ghost just doesn’t see it to make the connect. This appears to be an issue directly to do with the coding in Ghost, and from my weekend of google searches, this isn’t a new issue either. Really disappointed since this is a very very good CMS when it works.
I suppose, by the law of following the incentives, when the core business model is around a cloud hosting product (Ghost Pro) rather than the CMS itself, there is little incentive to be proactive and fix/support competing hosting products that cannabalize the total market for Ghost Pro revenue.
OK, so I tried it, since I haven’t deployed a droplet with 1-click in a while.
I created the droplet (chose the $6, 1GB plan), noted the IP address, logged into my DNS provider’s panel and added an A record pointing to that IP.
I ssh’d into the server (as root, because I was too lazy to set up ssh keys). The one-click install script ran. This took several minutes.
I put in my subdomain that had DNS pointing to the droplet. And yes, I got an nginx error. In looking at the files, I found the problem.
For whatever reason, lets encrypt had put the folder with all the certificates at /etc/letsencrypt/subdomain.mydomain.com_ecc , but nginx expected them at /etc/letsencrypt/subdomain.mydomain.com . So I moved them. And then I did ‘service nginx restart’, and boom, everything works. I’m not sure what’s changed since it used to work, but meanwhile the fix was /very /easy. So for now it’s one click and one commandline. :)
NGINX fails to restart because of the way the SSL file installs. All I had to do was open a file and update two file paths. I logged into sftp with cyberduck, looked for the example.com-ssl.conf file, opened it in VS Code, and changed these two lines to include _ecc