I’m running a self-hosted instance of Ghost on AWS Lightsail (Bitnami). I’ve diligently followed the Quick Start guide provided (accessible here: https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-quick-start-guide-ghost). However, upon executing the bncert-tool to establish an SSL certificate and enable the HTTPS protocol, I encountered an issue. Specifically, any new image I include in a post appears as disabled, with the “alt” attribute being displayed instead. Additionally, the content panel within the “view site” option of the admin panel is completely devoid of content.
Curiously, I observed that upon clicking the lock icon within Firefox and selecting the “disable protection for now” option, the previously missing images are now visible, and the content within the right admin panel is also displayed. I am seeking guidance on rectifying this issue while retaining the crucial HTTPS connection.
Your assistance in resolving this matter would be greatly appreciated.
Sounds like you’re serving a mix of https and http content. That can cause the behavior you describe.
@Cathy_Sarisky thanks for prompt reply. I’m seeing mixed content errors in the browser console. So, I tried a whole new page and uploaded new images from scratch. But guess what? The issue is still there! I can’t wrap my head around how this is possible. I mean, I made sure to set up the SSL certificate before uploading all the images.
Got any ideas? Thanks a bunch!
I don’t have experience with Bitnami, but I’m guessing your Ghost instance still thinks it is at http://yourdomain, so is using http urls for images when it constructs the page. I’d have expected that setting up SSL would have also adjusted the Ghost config, but it sounds like you’ve got http somewhere in your config still.
Another possibility is that your theme (if you wrote something custom) has http hard-coded somewhere, which would impact featured images but shouldn’t impact any images in the body of a post. If you’re not seeing problems with images in the post body (just featured images), it’d be worth trying another theme to make sure the problem isn’t there.
Hopefully someone with some Bitnami experience will have some ideas for you.
Unable to resolve mixed content errors even after employing the bncert-tool (an SSL/HTTPS configuration tool) on a Bitnami distribution of Ghost hosted on AWS Lightsail. In certain instances, such as featured images, the ‘src’ attribute of the image element refers to a relative file path – a commendable practice! However, in other scenarios, like regular images or those within a product widget, the ‘src’ attribute alludes to an absolute path utilising ‘http’ instead of ‘https’. This poses a SIGNIFICANT issue, as the browser raises mixed content errors, impeding the proper loading of several images. I’ve made attempts to modify the ‘url’ element in the configuration file from ‘http://example.com’ to ‘https://example.com’ (with ‘example’ standing in for my actual domain name); alas, these efforts have yielded no success. Does anyone possess insights to share? Where might I be erring? Your guidance would be most appreciated.
Thank you, @Cathy_Sarisky, for your kind assistance. I did attempt to modify the URL element within the config.production.json file. Regrettably, this resulted in a complete breakdown of the site. Following this alteration, any attempt to access the site redirects me to 127.0.0.1:2368. This situation is rather frustrating!
Should I anticipate the need to change the URL to “https” subsequent to employing the “bncert” tool? This particular requirement does not appear to be outlined in the official quick start guide on AWS Lightsail. If, indeed, this is an obligatory step, I find myself puzzled as to why I am met with a blank page bearing the IP address 127.0.0.1:2368.
Your guidance is greatly appreciated.
I don’t think that AWS Lightsail method is officially supported by the Ghost team. Based on URL, it’s an AWS document. If there’s a forum for Lightsail, it may also be worth asking there.
Ghost will redirect incoming requests it receives that aren’t at the expected URL to the expected URL. If you’ve told it that its url is 127.0.0.1:2368, you’re seeing the expected behavior. You need to tell it to expect to receive requests for https://yourdomain.com, and then you need to get the proxy in front of it to deliver those requests. The mixed content error from earlier was Ghost thinking it was at http://yourdomain.com, and so serving up pages with http links.
I’m going to update your post title in hopes of attracting some attention from self-hosters who might know the solution to your problem. I don’t have Lightsail experience to offer, sorry!
Hello, I am having exactly the same issue. Hier my blog: Mein Elektroauto - Audi e-tron 55 quatro
Can you tell me step by step, how to solve this problem? Thank you!