LetsEncrypt, EC2, 502 and 504 Errors

Some really strange stuff has happened over night.

Working on a project hosted on EC2.
Deployed updates last night with success, with LetsEncrypt enabled.

Made more updates this morning, deployed and received the error:
Could not access the challenge file for the hosts/domains.

Battled with this for a while with no success.

Disabling LetsEncrypt and re-provisioning the server succeeds but the site now shows either 502 Gateway Error or 504 Gateway Timeout.

We decided it wouldn’t be a bad idea to spin up a new EC2 instance and provision it to see if that fixes the issue. After doing so, it still errors at LetsEncrypt. We disabled it and can provision just fine but still receive either 502 or 504 errors.

Spent a lot of time on this discourse today attempting all sorts of fixes with no success. Perhaps someone can chime in and pin point something I may be missing?


You said you made some updates this morning. What updates did you make?

I mean we just made some basic html, sass and JavaScript updates.

It sounds like a host name issue if you can’t browse to it, and LE is failing. Can you share the relevant wordpress_sites.yml? Is DNS pointed properly to the server?

1 Like

@ben thanks and yeah we’ve applied that as well. Still no luck.

Will revisit this next week.
Moab calls :slight_smile: