Hi,
I would like my ghost blog to be served from mydomain.com/blog
instead of the root.
I followed a tutorial found here: https://www.ghostforbeginners.com/how-to-install-ghost-in-a-subdirectory/
but cannot get it working.
btw, ghost does work when I make it the root, mydomain.com/
. So I believe my installation is correct and that I am just having problems using it as a subdirectory.
Here is my block in my NGINX config file.
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_passhttp://localhost:2368
;
proxy_redirect off;
}
Here is my ghost config file
"url":"http://mydomain.com/blog/",
"database": {
"client": "sqlite3",
"connection": {
"filename": "content/data/ghost-dev.db"
},
"debug": false
},
"server": {
"host": "127.0.0.1",
"port": "2368"
},
"paths": {
"contentPath": "./content"
}
}
After restarting Ghost, it says "INFO Url configured as: http://mydomain.com/blog/
"
However, I get a 404 Page Not Found page when navigating to /blog. The sample posts are present on the page though without any images or CSS.
Any ideas on possible fixes?
Thanks!