Ghost Nginx 502 Bad Gateway but npm start --production Works
I have a weird situation where I am seeing
npm start --production start up my Ghost blog within my droplet and my website appears, but when I close that port and run
service ghost restart and
service nginx restart I get a 502 Bad Gateway. I’m a bit confused because I thought
service ghost start or
service ghost restart runs the
npm start --production command and keeps it running untilstop
is called. However this does not seem to be the case. Can anyone point me in the right direction for the logs I should check that might indicate why the command line command run works, butservice` command does not?
npm start –production
> email@example.com start /var/www/ghost > node index Migrations: Up-to-date at version 004 Ghost is running in production... Your blog is now available on http://www.connordphillips.com
sudo service ghost start start: Job is already running: ghost
My only question I have is around the
chown command I ran and if this blocked permissions to the
root user who is running the commands. I ran
chown -R ghost:ghost ghost/*, but I don’t have a ghost user, only a root user which is signed in. Could this mess with anything?