Hmm... let me think a minute...
Just to get a reference out there:
Do you have a folder named .well-known
in /var/www/html
?
Lets encrypt command throwing the same error even with the default Apache2 page.
I already been through with this blog, I have spent around 4 hours then I posted here.
You have the wrong certificate installed. We know that, but we can fix it.
Complete certificate history:
Just for the sake of sanity, try this:
sudo certbot certonly --cert-name veritebranded --apache -d "veritebranded.com,www.veritebranded.com" --dry-run
Output -
sudo certbot certonly --cert-name veritebranded --apache -d "veritebranded.com,www.veritebranded.com" --dry-run
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for veritebranded.com
http-01 challenge for www.veritebranded.com
Waiting for verification...
Cleaning up challenges
Failed authorization procedure. www.veritebranded.com (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://www.veritebranded.com/.well-known/acme-challenge/hJ0biZTb-HWZ0ORFN6CUxgxuVG1B-Fofgnj-Xfl5bXo [3.226.242.192]: "\n\n404 Not Found\n\n
Not Found
\n<p", veritebranded.com (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://veritebranded.com/.well-known/acme-challenge/MqJN2o3ZaDlBbZKKxuPd0My0sLLpz8PAdNKxAiM8dj0 [3.226.242.192]: "\n\n404 Not Found\n\nNot Found
\n<p"IMPORTANT NOTES:
-
The following errors were reported by the server:
Domain: www.veritebranded.com
Type: unauthorized
Detail: Invalid response from
http://www.veritebranded.com/.well-known/acme-challenge/hJ0biZTb-HWZ0ORFN6CUxgxuVG1B-Fofgnj-Xfl5bXo
[3.226.242.192]: "\n\n404 Not
Found\n\nNot Found
\n<p"Domain: veritebranded.com
Type: unauthorized
Detail: Invalid response from
http://veritebranded.com/.well-known/acme-challenge/MqJN2o3ZaDlBbZKKxuPd0My0sLLpz8PAdNKxAiM8dj0
[3.226.242.192]: "\n\n404 Not
Found\n\nNot Found
\n<p"To fix these errors, please make sure that your domain name was
entered correctly and the DNS A/AAAA record(s) for that domain
contain(s) the right IP address.
Something doesn't add up.
Apache is currently serving from /var/www/html/
for that domain, not from /var/www/html/ecom/
.
So either:
- One of these posts is not accurate, or
- Apache is not restarted, or
- You have more than one Apache installation (it's not a Bitnami server, is it?)
It's Magento _az ...
Yes, I assume Magento is sitting in the ecom/
directory. If you actually visit the domain right now, you see the Ubuntu default Apache page, which is in the directory above it.
veritebranded.com vs veritebranded.com/ecom
If the configuration posted was accurate, you wouldn't need the second URL to see Magento.
I think he changed the configuration a moment ago. I'm getting the standard 404 instead of the decorative 404 now. The certbot 404s show it in difference from the original post to the dry run a moment ago.
I just changed "/var/www/html/ecom/" to "/var/www/html/" to make sure that it is not related to magento so tested with default Apache2 page
That was my guess. Is there a .well-known in that folder?
Yes, It is there
:/var/www/html/.well-known$
It's not Halloween yet, @_az!
Don't give me a heart attack!
I wrote some certbot comedy here:
https://community.letsencrypt.org/t/discussion-the-certificate-handbook/133296/42?u=griffin
Perfect. Can you create a file named test
containing "OK" in /var/www/html/.well-known/acme-challenge/ ?
Its AWS EC2 instance
done as you said created test file
That's OK. Just not Bitnami, please no more Bitnami...
Beautiful! I can see the file!