Hey.
Im using version 2.10.1. with NGINX as reverse proxy. When opening a page in browser get notification about mixed content on the page. While looking at the source of the page I saw that some links werent generated with https. Namely:
Weirdly, if i just use https link in “url” parameter, it breaks proxy pass, because after that i can’t even curl to ghost install on http, as it tries to redirect to https, which of course wouldn’t work.
This isn’t an option for me, unfortunately. Ghost is installed on it’s own, separate instance and has no (and shouldn’t have, really) knowledge about our main reverse-proxy.
Can you, or anyone just point to me to an issue with my NGINX config ? As in, what exactly ghost-cli would do differently that would make it work right.
Im not sure to which “http config” you’re referring to.
NGINX section for ghost is written in my first post and it’s exactly the same one as in the template, minus X-Real-IP header, which shouldn’t make a difference.
My ghost does work on https, the only issue is those few HTTP links in the header\body of the rendered page.
And I assume it’s because in my ghost config, i have URL written with http:
"url": "http://example.com/blog",
But if i switch it to https, it stops working at all even on it’s own, because now node server wants to serve content over https.
curl http://127.0.0.1:2368/blog
Moved Permanently. Redirecting to https://127.0.0.1:2368/blog/
I think there were a couple of misunderstandings Here’s a couple of things that should hopefully help:
Your ghost url must be configured to https.
If you don’t set the x-forwarded-proto header, the ghost instance will redirect you. That’s why you got a redirect with curl. If you access the site through nginx, you shouldn’t run into a redirect issue