Ghost blog up after ubuntu upgrade

April 18, 2014 2.1k views
I upgrade to from 12.04 to 14.04. Now the nginx page comes up instead of my ghost blog. I went back and make sure ghost was running. I can see node and ghost running so I am unsure what when wrong. Any thoughts? Thanks
2 Answers
Your nginx config file was probably reset. Did you follow a tutorial to install Ghost? If so, just follow the parts that deal with nginx's config file again.
Hey Seth,

I was just able to reproduce this starting with a Ghost droplet and upgrading it to 14.04 The configuration isn't being overwritten, but for some reason /etc/nginx/conf.d/default.conf isn't loaded. The fix is easy enough though.

Open the file "/etc/nginx/sites-enabled/default" and find the section that looks like

location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
# Uncomment to enable naxsi on this location
# include /etc/nginx/naxsi.rules

replace it with the following:

location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header HOST $http_host;
proxy_set_header X-NginX-Proxy true;

proxy_redirect off;

Finally, restart nginx using the command

service nginx restart

Ghost show now be available again. Let us know how it goes!

Have another answer? Share your knowledge.