I just checked nginx.service on my environment where I’ve installed Ghost using Ghost-CLI, it shows that the systemd service isn’t set up to restart nginx:
I don’t see the code in Ghost-CLI that adds systemd service so I suppose it’s been added by the initialization script in my DigitalOcean droplet. But shouldn’t it be restartable? The ghost.service is. As nginx is set up as a reverse-proxy, if it fails the requests won’t get through to Ghost server, right?
You’re correct in that if nginx is not working requests won’t be proxied to Ghost.
While I can’t say if the DO 1-click image explicitly overrides the nginx config, I think when installing nginx via apt (e.g. sudo apt install nginx), the nginx systemd config doesn’t declare a value for restart, so restart probably defaults to no. Here’s an example nginx config:
You can always take a look at the service config, probably located in /etc/systemd/system/multi-user.target.wants/nginx.service as well
My installation is a debian installation that’s hosted with Linode, as I had been using them before I found Ghost, and don’t plan on switching. I installed nginx several years ago, without messing with the systemd config. I’m not planning on changing its (systemd) config, because nginx has been extremely reliable since I installed it; I’m just trusting that the authors know what they’re doing when they’re not specifying whether nginx should restart
You better do the switching stuff soon. As the things are a lot more fun here. I have been using Ghost with the linode server. unlike you I have been using the managed Linode server which is powered by Cloudways and it’s been working great for me.