Unable to create certificate on AWS EC2 Ubuntu instance

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: mautic.promptmakr.com

I ran this command: sudo certbot --apache

It produced this output:
Some challenges have failed.
Certbot failed to authenticate some domains (authenticator: apache). The Certificate Authority reported these problems:
Domain: mautic.promptmakr.com
Type: unauthorized
Detail: {a key} Invalid response from https://mautic.promptmakr.com/.well-known/acme-challenge/{some more characters here}: 504

Hint: The Certificate Authority failed to verify the temporary Apache configuration changes made by Certbot. Ensure that the listed domains point to this Apache server and that it is accessible from the internet.

My web server is (include version):
Hosted on AWS as an EC2 instance

The operating system my web server runs on is (include version):

My hosting provider, if applicable, is:
Amazon AWS (EC2)

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 2.9.0

If the --apache plugin was working right you would not see httpS:// in the error message. That only happens when you Apache server redirects the original HTTP request to HTTPS. And, the --apache plugin would override that.

But, current tests to your domain get a timeout so you must have changed something since then. Is your EC2 Security Group set to allow inbound requests on port 80? Maybe your EC2 public IP changed and you have not updated the DNS? If you are not using an Elastic IP it changes each time you stop/start the instance.

Are you able to connect to your domain using HTTP from the public internet?

The Let's Debug web site is helpful when testing new setups


I reinstalled the EC2 instance and this time everything seems to have worked.



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