Site Preview/Design shows up blank

- What version of Ghost are you using? Latest
- What configuration? Docker & Portainer, with Nginx Reverse Proxy pointing domain to my docker container and has a letsencrypt ssl cert applied
- What browser? Chrome/Edge

I installed Ghost via Portainer’s template. Everything works well except the Site’s Preview panel is completely blank. I saw a post earlier saying it needs to have the url changed from http to https. Where exactly do I have to go to change that?

I have Nginx have a Proxy Host setup for my domain. It’s got the scheme as http and pointing to my container’s ip&port. LetsEncrypt is also enabled. It works setup like that. But, If I change the scheme to https, the site doesn’t load at all and I get a host error when trying to pull it up.

In Portainer, if I change the Env variable URL from http://mydomain.com to https://mydomain.com; It breaks the site and I can’t access it just like changing it in Nginx.

I’m totally stumped where to go. Can anyone help me out?

You need to change it here, since this is the URL Ghost uses to make all of the other URLs.

does your nginx config include the x-forwarded-proto header?

Ok, I’m trying to understand as I’m really new and wrapping my head around Ghost. So please be patient with me.

When you say “Change it here” you mean change the Env variable in Portainer for the url to https:// instead of http://, correct?

And then I go into Nginx and click on the Proxy Host for my site and in the Advanced tab, enter in the code for custom configuration right? Because right now there is nothing in the advanced tab.

I added it in like in the screen shot just now, but not sure what to change.

Correct! Ghost will pick up the URL for your site in 1 of 2 ways - your config file (which most docker instances don’t have), and environment variables (which is the url [lowercase] variable you’re referring to)

Your nginx config looks correct

Portainer doesn’t have to have SSL does it?

Ok, I changed the Environment variables in Portainer to ulr (lowercase) and the path to https://mydomain.com (obviously my actual website, not the words mydomain).

When I do that and add in the Nginx advanced configuration like in the screen shot then go to the details tab and change the scheme to https and hit save the site comes up with a Error 502 Bad Gateway.

I can’t help you much on the docker aspect since I know very little about the networking aspect :sweat_smile: You need to make sure your nginx container is able to communicate with your Ghost container, and the ports match.

Yeah, it’s all new to me as well. Messed around with it for several hours and the best I can get is when Nginx has the advanced configuration like in the screenshot and the scheme in the details tab set to https; along with my ghost container in portainer set to url = https://mydomain.com, and accessing my site, it pulls the the “welcome to Nginx!” page. I’m completely stumped.

have you solved this ?