Ghost Image - nginx Redirection to Ghost

February 26, 2014 1.7k views
I've installed the ghost image and I'm trying to figure out where the redirect to Ghost is? I've checked the nginx config and the root is here: /usr/share/nginx/www But can't see anything that redirects to Ghost? Also if I put a html or php file in the document root it's not accessible?
3 Answers
Nginx doesn't use .htaccess files. It just proxies all requests to Ghost (take a look at the files in /etc/nginx/sites-enabled).

I'm having a similar problem, with nginx redirecting everything to Ghost. I have ghost running under the subdirectory /blog via nginx, following this guide, but now it returns Ghosts 404 page for the root folder. The droplet is running the Ghost application and have only been edited in the ghost config.js to fit /blog and in the default file under sites-available, according to

location ^~ /blog {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;

proxy_redirect off;

Has anyone any suggestion?

Can you pastebin the whole file?
Have another answer? Share your knowledge.