Error installing Let's Encrypt on AWS Linux

We have been successfully installing Let’s Encrypt certificates to several servers during the last year, but since a month ago we got errors and can not install it on any other server. We work with AWS.

My domain is: ***.com

I ran this command: sudo /opt/letsencrypt/letsencrypt-auto --debug

It produced this output:

Obtaining a new certificate
Performing the following challenges:
http-01 challenge for ****.com
Cleaning up challenges
Exiting abnormally:
Traceback (most recent call last):
_ File “/opt/”, line 11, in _
_ sys.exit(main())_
_ File “/opt/”, line 1240, in main_
_ return config.func(config, plugins)_
_ File “/opt/”, line 994, in run_
_ certname, lineage)_
_ File “/opt/”, line 118, in get_and_save_cert
_ lineage = le_client.obtain_and_enroll_certificate(domains, certname)_
_ File “/opt/”, line 357, in obtain_and_enroll_certificate_
_ certr, chain, key, _ = self.obtain_certificate(domains)_
_ File “/opt/”, line 318, in obtain_certificate_
_ self.config.allow_subset_of_names)_
_ File “/opt/”, line 74, in get_authorizations_
_ resp = self.solve_challenges()
_ File “/opt/”, line 115, in solve_challenges
_ resp = self.auth.perform(self.achalls)_
_ File “/opt/”, line 1950, in perform_
_ http_response = http_doer.perform()_
_ File “/opt/”, line 70, in perform_
_ self.mod_config()
_ File “/opt/”, line 97, in mod_config
_ for vh in self.relevant_vhosts():
_ File “/opt/”, line 134, in relevant_vhosts
_ " {0}.".format(http01_port))_
PluginError: Unable to find a virtual host listening on port 80 which is currently needed for Certbot to prove to the CA that you control your domain. Please add a virtual host for port 80.
Please see the logfiles in /var/log/letsencrypt for more details.

My web server is (include version): Apache/2.2.34 (Amazon)

The operating system my web server runs on is (include version):Amazon Linux AMI release 2017.09

My hosting provider, if applicable, is: Amazon Web Services

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

1 Like

Please show the output of:

apachectl -S

This is:

VirtualHost configuration:
wildcard NameVirtualHosts and default servers:
default:443 (/etc/httpd/conf.d/ssl.conf:74)
Syntax OK

Since you don’t have the typical VirtualHost running on port 80 in your Apache configuration, I think Certbot is not sure how to authenticate and configure your domain.

I think you might be able to try issue a certificate by manually specifying the web root of your website (substitute /var/www/webroot for your real document root):

/opt/letsencrypt/letsencrypt-auto --authenticator webroot --installer apache -w /var/www/webroot -d

It works! Thank you so much, you have saved my day!

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