I setup a ghost blog on google cloud, with SSL being handled on Google’s own load balancer. The pages load fine without any issues, however, whenever I upload images to my posts, the images are loaded over http and not https.
Your site url is configured to be http://webfives.com. If you’re using SSL, your site url must be configured with it (run ghost config set url https://webfives.com)
The website is hosted on Google Cloud Platform (GCP) and this was my previous (non-working setup):
website => Load Balancer w/SSL (managed SSL by GCP) => instance/s
Nameserver hosted on CloudFlare with SSL turned off.
Site url configured as: http://webfives.com
Site url (SSL) configured as: https://webfives.com
The above setup resulted in images in my posts loaded as http.
Fix:
website => Load Balancer (no SSL cert on the loadbalancer) => instance/s
Nameserver hosted on CloudFlare with SSL turned ON.
Site url configured as: http://webfives.com
Site url (SSL) configured as: https://webfives.com
The above setup works. I imagine the issue is related to routing between LB with SSL vs LB without SSL and Cloudflare managing the cert.
Thank you for the fix. After setting the URL as you mentioned here, the issue was not fixed. However, the site URL was changed to HTTPS, not image URL’s. According to this guide https://errorsfixing.com/ghost-blog-showing-images-in-http-instead-of-https/ you will need to restart ghost after changing the site URL. Also, I got 502 errors after restarting Ghost. Then I manually started the ghost server as mentioned in the guide and now it is working 100% perfectly!