By cematesh
Hello,
I am trying to run a ghost blog in a subdirectory(/blog) instead of the direct domain link. I have changed the location from /etc/nginx/sites-available/site_name.conf
server {
listen 80;
listen [::]:80;
server_name domain.com;
root /var/www/ghost/system/nginx-root;
location ^~ /blog {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:2368;
}
location ~ /.well-known {
allow all;
}
client_max_body_size 50m;
}
and changed the config.production.json file to:
production: {
url: 'http://example.com/blog/',
mail: {},
database: {
...
and then I restarted the server
sudo service nginx restart
it has been moved to /blog but it doesn’t show me the posts, images, footer, admin page /ghost link etc., perhaps it’s about MySql but I couldn’t find a way to solve it, may someone direct me how can I solve it?
Thank you,
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!
Accepted Answer
This question was answered by @X40C:
Try removing the / at the end of the url in ghost’s config file. You can then cd to the gost dir and issue
ghost restart. If this doesn’t help i’ll spin’up a ghost instance and see if i can figure it out.
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.