- Newest
- Most votes
- Most comments
Using the workflow, which produces an IP resolution error (due to Cloudflare proxying).
Lightsail's secure WordPress workflow is designed to work with Let's Encrypt certificates installed directly on the instance. This won't work with Cloudflare.
Perhaps the Use Let’s Encrypt SSL certificates with your Lightsail WordPress instance can provide hints that apply to your situation (specifically ensuring you have SSL configured correctly in WordPress so all your images are served securely as well).
When using a CDN like Cloudflare, make sure you're configuring the cache settings correctly. With Lightsail distributions there is a preset for WordPress instances that caches nothing except wp-includes/
and wp-content
– you likely need a similar configuration with Cloudflare.
Typically you would only have one DNS record per sub-domain/apex. Having one record pointing to Lightsail and another to Cloudflare could be one source of issues. If you plan you use Cloudflare as your DNS provider, point your registrar to Cloudflare and your Cloudflare admin to a Lightsail instance with a static IP address attached (IPv6 addresses remain with the instance between start/stop as long as you keep IPv6 enabled).
Shouldn't the workflow work, at least for debugging purposes, when Cloudflare has been paused for a given site? Perhaps it hasn't due to the extra records that came by default with the Cloudflare service that I never removed. I'll clean up my DNS records.
I appreciate the heads up regarding the preset for WP caching. I had been managing it manually, with mixed results (disabled it entirely in Cloudflare for the admin panel using their cache rules, behavior was still iffy, most likely due to a wonky SSL installation).
I will take a deeper look at that guide, thanks! I had seen a very similar one that relied exclusively on comparing the DNS record IP with the instance's public IP, so I most likely opened it and dismissed it at some point.
I have been having a similar issue and from what I have found out you have to attach the certificate to a load balancer and then attach that load balancer to an instance. Stand alone instances do not seem to support HTTPS. As for how to attach an existing certificate, I have no idea. Ive been trying to figure that out all day and haven't had much luck with creating a new one through lightsail either.
Relevant content
- asked 5 months ago
- asked 4 months ago
- asked 6 months ago
- asked 2 years ago
The workflow never worked. I guess it's something to accept as a price to pay for Cloudflare's proxying services. What ended up working was generating it using Lego, as follows:
export CLOUDFLARE_EMAIL='your_email@provider.com' export CLOUDFLARE_API_KEY='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
cd /opt/bitnami/letsencrypt ./lego --email your_email@provider.com --dns cloudflare --domains="example.com" --domains="www.example.com" renew cd /opt/bitnami/apache/conf/bitnami/certs sudo cp /opt/bitnami/letsencrypt/.lego/certificates/example.com.crt server.crt sudo cp /opt/bitnami/letsencrypt/.lego/certificates/example.com.key server.key sudo /opt/bitnami/ctlscript.sh restart apache
Site is now working flawlessly, no caching errors or slowdown with Cloudflare enabled. Wrapped it up with the Really Simple SSL Wordpress plugin.