Hi, I am currently running ghost on docker, with a load balancer in front of it, and I get this issue which I don’t understand:
ubuntu@qcloud:~/data/compose/ghost$ curl https://blog.xoxox.io
Moved Permanently. Redirecting to https://ghost/
the following is the my settings of everything
You’re nginx config is not passing the necessary headers through to Ghost so it won’t know what URL it’s serving. Ghost-CLI is the recommended/supported way to install Ghost, it has nginx templates that you should follow if installing your own way.
after I added the following headers from templete nginx file to conf
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;
nothing changes
nginx is not on the same node which blog is deployed. nginx is deployed in USA, but blog is deployed in China, I am sure the blog is accessable, because if url is not set in the environment, redirect is successful.
proxy_pass http://ghost;
above line is just pointing to the upstream:
upstream ghost {
server qcloud.xoxox.io:2368;
}