Keep failing Cert registration

My domain is:

I ran this command:
certbot certonly --webroot

It produced this output:
Domain: www.fileit.org
Type: unauthorized
Detail: Invalid response from
http://www.fileit.org/.well-known/acme-challenge/P5C-0MvdPFB63VYV0tRxvyuKPZk8
EPwad3G2wKAPsQ8

My web server is (include version):
IIS 8.5

The operating system my web server runs on is (include version):
Windows Server 2012R2

My hosting provider, if applicable, is:
Locally hosted

I can login to a root shell on my machine (yes or no, or I don't know):
YES

I'm using a control panel to manage my site (no, or provide the name and version of the control panel):

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

The website is running from c:\inetpub\wwwroot and the command creates the certbot folders:
C:\inetpub\wwwroot\.well-known\acme-challenge

1 Like

Try creating a test challenge file and see if it can be reached from the Internet.
echo success > C:\inetpub\wwwroot\.well-known\acme-challenge\test-1234

Then:
http://www.fileit.org/.well-known/acme-challenge/test-1234

Also, the IIS version is 8.5

1 Like

https://www.fileit.org/.well-known/acme-challenge/test1234.txt

Please remove the .txt extension from the file.
In order to best simulate an actual challenge file, it can't have any extension at all.

1 Like

Thanks for your help. I guess it thinks it's a directory now

2 Likes

I gave you the exact command; all you have to do is copy it into a cmd prompt and press ENTER.

1 Like

Ok, I entered your command. No change in result

1 Like

Well the file is not found (404).
So the directory in use is not the one where you think it should be.
First, let's be sure the file was put there correctly:
[from a cmd prompt - please show]
dir C:\inetpub\wwwroot\.well-known\acme-challenge\

1 Like

Directory of C:\inetpub\wwwroot.well-known\acme-challenge

11/27/2020 05:22 PM .
11/27/2020 05:22 PM ..
11/27/2020 05:22 PM 10 test-1234
1 File(s) 10 bytes
2 Dir(s) 982,906,478,592 bytes free

1 Like

Ok so the file is there but IIS is not serving it.
That can only mean that c:\inetpub\wwwroot\ is not the root of http://www.fileit.org/

1 Like

When I put the txt file in there, with the extension, IIS serves up the txt file

1 Like

Go ahead and rename test-1234 to test-1234.txt
Let me see that in action.

1 Like

OK, https://www.fileit.org/.well-known/acme-challenge/test-1234.txt

1 Like

Yes, both HTTP and HTTPS show the text file when it has the .txt extension.
IIS is not liking files without an extension.
You have to set a MIME TYPE for such files to "text/html"

Not sure right now where that is in Windows.
We can consult with the Google Gods for that - LOL

1 Like

Ok, ,I'll try that. Thanks for your help.

2 Likes

If you run into any other problems, you know where we are :slight_smile:

1 Like

Done, I created a new mime type based on nothing for an extension and the server is serving up the file without the extension

1 Like

Ok
Much better.

Now try the command again:

1 Like

c:\inetpub\wwwroot>certbot certonly --webroot
Saving debug log to C:\Certbot\log\letsencrypt.log
Plugins selected: Authenticator webroot, Installer None
Please enter in your domain name(s) (comma and/or space separated) (Enter 'c'
to cancel): FileIT.org
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for fileit.org
Input the webroot for fileit.org: (Enter 'c' to cancel): C:\inetpub\wwwroot
Waiting for verification...
←[31mChallenge failed for domain fileit.org←[0m
http-01 challenge for fileit.org
Cleaning up challenges
←[31mSome challenges have failed.←[0m
←[1m
IMPORTANT NOTES:
←[0m - The following errors were reported by the server:

Domain: fileit.org
Type: unauthorized
Detail: Invalid response from
http://fileit.org/.well-known/acme-challenge/MzEbMjiJdoPnKZGJKBcB2yrJtjHiGWTp
OK1BJgEGOPo
[184.71.17.182]: "\r\nNo
t
Found\r"

1 Like

Is that an administrative cmd prompt?

  • If not, open cmd prompt as admin, then try it again.
  • If so, then maybe the folder permissions are blocking certbot from putting the file there and we may need to run it with more verbosity -vvv to see why this fails [and add --dry-run so you don't start hitting limits].
1 Like