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 stop
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?
Successful command: npm start --production
> firstname.lastname@example.org 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?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.