Cannot get the certificate - failed in challenge

I installed an Apache server on a standalone machine and linked a domain name to the server IP (static IP) address (use the Record A to point to the IP).
There is no problem to access the web pages from the a web browser.
However, I cannot get the certificate with certbot.
Even I do nothing after a fresh Apache installation, still can't get the certficate.
I also followed some instructions to create the .well-known folder
It's ok to access:
http://austinwu.ca/.well-known/acme-challenge/1234

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. crt.sh | example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is:
Austinwu.ca
I ran this command:
certbot certonly --standalone
It produced this output:
Certbot failed to authenticate some domains (authenticator: standalone). The Certificate Authority reported these problems:
Domain: austinwu.ca
Type: unauthorized
Detail: 74.208.37.65: Invalid response from http://austinwu.ca/.well-known/acme-challenge/oHScM3uiYQrdROLWv6g71SyYy9eTQe2ERiGLTT2xU-Q: 404

Hint: The Certificate Authority failed to download the challenge files from the temporary standalone webserver started by Certbot on port 80. Ensure that the listed domains point to this machine and that it can accept inbound connections from the internet.

My web server is (include version):
Apache 2.4.53

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

My hosting provider, if applicable, is:
Standalone machine

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):no

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

1 Like

Welcome to the community @wugangca

You cannot use standalone method when another web server is running. Usually Certbot warns that it cannot bind to port 80. But, on Windows that warning does not always happen. It's a quirk on how Windows manages ports, I guess.

Anyway, you should use the Apache plug-in or certonly --webroot methods.

It mostly depends on whether you want Certbot to configure an HTTPS VirtualHost for you or whether you prefer to create those yourself.

I see you already have an HTTPS VHost with a self-signed cert. We should review how that is setup before trying to use the Apache plug-in to update your config.

Let us know if you want further help and which method you prefer. See Certbot docs for details

4 Likes

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