Question
502 Bad Gateway After Updating Ghost
This morning, I upgraded my Ghost blog from 0.3.3 (the original droplet version) to 0.7.1.
- I stopped the Ghost service with
sudo service nginx stop
. - I downloaded the
ghost-latest.zip
file. - I removed the existing
core
folder and replaced it with the one from the compressed file. - I also updated the
index.js
,Gruntfile.js
,package.json
, and the Markdown files. I also added thenpm-shrinkwrap.json
file. - I deleted the
node-modules
folder withsudo rm -r node_modules
, then ransudo npm cache clear
before runningsudo npm install --production
. - I also verified that all files in destination folder were owned by the
ghost
user, as was the case prior. - After a few hiccups, I was able to successfully start Ghost from the command line using
npm start --production
. My database was migrated from version 000 to version 004, and I got the messageGhost is running in production...
in the console. - I did not change the
config.js
in the Ghost main folder or the nginx configuration file. I know that nginx is still functioning, because I have multiple sites referenced in the configuration file, and they are all still running.
When I try to access the Ghost blog, I get a 502 Bad Gateway error. I’ve restarted both the nginx and ghost services and I still get the same error. Can anyone help?
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.
×
I updated my blog from 0.7.1 to 0.7.2 and I’m stuck with the same error when trying to access the droplet via IP or by the reference domain name.
Any help will be greatly appreciated. Thanks in advance.