Renewal: Invalid response from '.well-known/acme-challenge' 404 but letsdebug is ok

…huh. Interesting. I’ve been using nginx on this server for about 3 years at this point. I suspect that easy engine may have installed it as Apache was installed by default, and since Apache wasn’t doing any harm I just left it there. I didn’t realise it was actually running though. I’ll try uninstalling Apache and running again.

There’re a couple of other variables that might be worth mentioning. Firstly, all my http redirects to https. I have a single default server block that listens on port 80, then returns a 301 to the relevant https url: return 301 https://$server_name$request_uri;). I then have all my various subdomains listening on 443. This is for my development server, so each subdomain serves a different root directory for a different client’s site. I did wonder if the redirect might be causing the issue, but according to this thread from last year the challenge should follow the redirect and then work as expected. The certificate is also still valid (for today at least), so a redirect to 443 would presumably still be fine.

The other thing that might bear mentioning is that, being a development server, all of my sites are secured with basic http auth. I’ve tried turning this off temporarily while renewing certificates to see if that made a difference, and it didn’t. I’ll try uninstalling apache and see what I find.