Apache under Windows errors on challenge

I run Apache 2.4 on Windows. The site cannot be stopped, so I have to resort to --webroot
When I run certbot with --webroot option, it randomly succeeds or fails on various sites that are served by this box. I will start with the issue where the root cause at least seems to be on the surface, and then move on to absolutely random failures.

Could someone explain what is missing?

Detail: Fetching http://www.<mydomain>.com.well-known/acme-challenge/wVajUSrEJvnEm6I1UWZ4hBKHY5B3RuSqRQOx0Sdu-oY: Invalid host in redirect target "www.<mydomain>.com.well-known". Check webserver config for missing '/' in redirect target.

In the log entry above it appears as if your server tries to reach a wrong domain because it is missing a trailing slash after .com. Is this the case?

my command is

certbot certonly --webroot -w <path> -d <mydomain>.com

1 Like

Yes, but the reason it’s doing this is because Apache is failing to include that trailing slash during a redirect:

It’s the difference between (wrong):

Redirect / http://www.mydomain.com

and (right):

Redirect / http://www.mydomain.com/
1 Like

Awesome! Solved the problem spectacularly!


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.