Question
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 until
stopis 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, but
service` command does not?
Successful command:
npm start –production
> ghost@0.7.9 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
Service start
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?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×