0
votes

I am new to AWS Beanstalk and there was an existing project that I'm working with that is deployed but I had to change the Private Key associated with it and after updating the security and pairing it with another private key, the instance was remade and now I get this...

Could someone please help me figure out what to do? really appreciate it!....

Command failed on instance. Return code: 1 Output: (TRUNCATED)...our Certbot configuration directory at /etc/letsencrypt. You should make a secure backup of this folder now. This configuration directory will also contain certificates and private keys obtained by Certbot so making regular backups of this folder is ideal. container_command 20_getcert in .ebextensions/00_apache_ssl.config failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.

Obtaining a new certificate Performing the following challenges: http-01 challenge for domain.com Cleaning up challenges Exiting abnormally: Traceback (most recent call last): File "/opt/eff.org/certbot/venv/bin/letsencrypt", line 11, in sys.exit(main()) File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/main.py", line 14, in main return internal_main.main(cli_args) File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/_internal/main.py", line 1350, in main return config.func(config, plugins) File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/_internal/main.py", line 1237, in certonly lineage = _get_and_save_cert(le_client, config, domains, certname, lineage) File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/_internal/main.py", line 121, in _get_and_save_cert lineage = le_client.obtain_and_enroll_certificate(domains, certname) File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/_internal/client.py", line 416, in obtain_and_enroll_certificate cert, chain, key, _ = self.obtain_certificate(domains) File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/_internal/client.py", line 347, in obtain_certificate orderr = self._get_order_and_authorizations(csr.data, self.config.allow_subset_of_names) File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/_internal/client.py", line 395, in _get_order_and_authorizations authzr = self.auth_handler.handle_authorizations(orderr, best_effort) File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot/_internal/auth_handler.py", line 70, in handle_authorizations resps = self.auth.perform(achalls) File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot_apache/_internal/configurator.py", line 2301, in perform http_response = http_doer.perform() File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot_apache/_internal/http_01.py", line 76, in perform self._mod_config() File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot_apache/_internal/http_01.py", line 111, in _mod_config for vh in self._relevant_vhosts(): File "/opt/eff.org/certbot/venv/local/lib/python2.7/site-packages/certbot_apache/_internal/http_01.py", line 166, 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. IMPORTANT NOTES: - Your account credentials have been saved in your Certbot configuration directory at /etc/letsencrypt. You should make a secure backup of this folder now. This configuration directory will also contain certificates and private keys obtained by Certbot so making regular backups of this folder is ideal. (ElasticBeanstalk::ExternalInvocationError)

1

1 Answers

0
votes

You have web server configuration issue, that's why certbot cannot validate your domain, check the configuration below for the recommended setup

https://gist.github.com/cichondev/08056094a27cfcc7424afc3afcbf781c