Status 400 and Too many redirects

Hi,
My domain is: www.debian.pl

I ran this command:
certbot certonly --dry-run --standalone -w /home/debianpl/web/debian.pl/.well-known/acme-challenge/ -d www.debian.pl -v
And this command:
certbot certonly --dry-run --webroot -w /home/debianpl/web/debian.pl/.well-known/acme-challenge/ -d www.debian.pl -v
And this:
certbot certonly --dry-run --standalone -d www.debian.pl
And many variations of those.

It always produced this output (even with stopped apache and with standalone option):
Failed authorization procedure. www.debian.pl (http-01): urn:ietf:params:acme:error:connection :: The server could not connect to the client to verify the domain :: Fetching http://www.debian.pl/.well-known/acme-challenge/k8n-f1Md4zA3JBzM0xfRwYob1bXB1QnkqMfWZhNMAPg: Too many redirects
More verbose:
"challenges": [
{
"type": "http-01",
"status": "invalid",
"error": {
"type": "urn:ietf:params:acme:error:connection",
"detail": "Fetching http://www.debian.pl/.well-known/acme-challenge/7Te0xQUo83fdsx4sjPJcktfOr1_JUgQ6QQ-wg0t9nJI: Too many redirects",
"status": 400
},

My web server is (include version):
Apache 2.4.38-3
The operating system my web server runs on is (include version):
Debian stable

I can login to a root shell on my machine: yes

I'm using a control panel to manage my site: no

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot): certbot 0.31.0

And if i make curl request: curl -Lvk http://www.debian.pl/.well-known/acme-challenge/3oHoOKzACl04I2f9pFQ4KIKCJ6-V51-9sJpIJjAfaWY
There is NO REDIRECT:
* Trying 195.66.73.43:80...
* TCP_NODELAY set
* Connected to www.debian.pl (195.66.73.43) port 80 (#0)
> GET /.well-known/acme-challenge/3oHoOKzACl04I2f9pFQ4KIKCJ6-V51-9sJpIJjAfaWY HTTP/1.1
> Host: www.debian.pl
> User-Agent: curl/7.68.0
> Accept: /
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Date: Thu, 29 Oct 2020 08:45:22 GMT
< Server: Apache/2.4.38 (Debian)
< Last-Modified: Thu, 29 Oct 2020 08:12:37 GMT
< ETag: "0-5b2cad7cc00c6"
< Accept-Ranges: bytes
< Content-Length: 0
<
* Connection #0 to host www.debian.pl left intact

Try with -6 and you'll be able to reproduce it. Or take a gander at this.

2 Likes