I'm setting up a ghost instance in a subdirectory, and want to point the root (/) to a static page. This is what I have in my nginx conf.
location / {
rewrite ^ /blog/about break;
}
location ^~ /blog {
proxy_pass http://localhost:2368;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_buffering off;
}
The good news is that the redirect for the root works, in that the user is redirected to the right page (/blog/about). However, his URL address also works. I didn't expect this to happen with the rewrite, can someone help me point out what's wrong here?