connect a cloudfront distribution to a lightsail wordpress instance after configured HTTPS on it

0

I have configured wordpress instance to use https following this docs

https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-enabling-https-on-wordpress.

I also want to connect a cloudfront distribution to improve performance, but after connect the distribution and have setted https only flag it returns a 502 error saying The request could not be satisfied.

Error message

I have already done the wp config edit for cloudfront distribution described in this docs

https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-editing-wp-config-for-distribution

is there any way to configure a distribution after have setted HTTPS on wordpress instance?

asked 6 months ago207 views
1 Answer
0

Hello.

A 502 error occurs when CloudFront cannot access your origin.
What settings are you making to access the origin from CloudFront?
Did you specify HTTPS Only when specifying the origin in CloudFront?
https://repost.aws/knowledge-center/cloudfront-502-errors
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-https-cloudfront-to-custom-origin.html

profile picture
EXPERT
answered 6 months ago
  • Yes I have specified the HTTPS only flag. So, problem is that instance is using a self signed cerificate created using Let's encrypt

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions