I’ve recently been playing around with Ghost as a possible blogging platform and attempted to install a theme I found. I put the files into the ghost/content/themes folder and extracted the zip (that all went just fine). I then went to restart ghost as is suggested on the guide I was following and I’m now getting a 502 error from nginx.
See http://elliotblackburn.com/
The only command I tried to restart with was sudo service ghost restart.
I then found https://www.digitalocean.com/community/questions/502-bad-gateway-after-ghost-upgrade?comment=24356 and attempted to do the same but to nginx and it said it restarted just fine but I’m still getting a 502 error.
Here is a copy of my /var/log/nginx/error.log - http://pastebin.com/TLNHP5VU
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!
I know it’s an old thread and I apologize for reviving but this thread just helped me get my ghost app back up and running after restoring a failed upgrade attempt. I’d like to point out that you should “cd” to your ghost installation folder before running npm --start production… like this:
cd /var/www/ghost
This is an example of the ghost installation folder, YMMV.
After CD’ing to it, run the following:
npm start --production
I am getting similar error after ghost restart and log file suggest: verbose stack Error: ENOENT, open ‘/var/www/package.json’ this persist after cache clean.
I ran into the same problem after upgrading ghost.
Make sure the port number configured in your ghost’s config file and the proxy_pass in your ghost site’s nginx configuration files match.
Check the port number in
/var/www/ghost/config.production.json matches the proxy_pass port in the nginx config files.
/var/www/ghost/system/files/<yourDomainName>.<extension>.conf
/var/www/ghost/system/files/<yourDomainName>.<extension>-ssl.conf
In my case I had to change 2368 to 2369 in the nginx config files to fix the issue.
Make sure you restart your ghost and nginx after you make the changes.
# restart your ghost site
cd /var/www/ghost/
ghost restart
# restart nginx
sudo systemctl restart nginx
Hope this helps someone.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.