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. https://crt.sh/?q=example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
No names were found in your configuration files. Please enter in your domain
name(s) (comma and/or space separated) (Enter âcâ to cancel): invystasafe.com
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for invystasafe.com
Waiting for verificationâŚ
Cleaning up challenges
Failed authorization procedure. invystasafe.com (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://invystasafe.com/.well-known/acme-challenge/OYyHDH1mlsaGcX3Ru_q5pqcE1TnCWsHRK6lYOONyUjk [54.219.172.188]: â\n\n404 Not Found\n\n
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.My web server is (include version):
The operating system my web server runs on is (include version): Ubuntu 18.04 LTS
My hosting provider, if applicable, is: AWS
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): Not sure what a âcontrol panelâ is in this context. I use AWS to manage the server instance, and ssh into the instance to start/stop the Apache server
The version of my client is (e.g. output of certbot --version or certbot-auto --version if youâre using Certbot): certbot 0.31.0
I use the standard Ubuntu ssh client (literally called âsshâ). Also, with an AWS EC2 instance, only certain IPâs (as configured by me) can ssh from a remote IP to my AWS instance.
I am curious why are the question regarding ssh client; can you elaborate?
Oh its just I had issues(not the exact same, but similar) until I used 'sudo -s' in linux.
I have absolutely no idea what that command does to be honest, but it kick started my ability to be able to interact with certbot. (my linux skills are white belt levels, i am but a humble php developer grappling with this stuff lol)
Also, Looking at the letsencrypt.log file I noticed the following:
certbot looks at /etc/apache2 directory. I had built the Apache server to use /etc/apache. So I rebuilt the server to use /etc/apache2
certbot adds an entry to /etc/apache2sites-enabled/000-default.conf. My Apache server was not Including this file. This is now included. The apachtcl -S output above is AFTER I made this change.
Presently, I am running into an status 429 - too many failed authorizations. So, after reading letsencrypt.org/docs/rate-limits, I will wait a few hours and try again.
(several hours later)
root:/etc/apache2# certbot --apache
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
No names were found in your configuration files. Please enter in your domain
name(s) (comma and/or space separated) (Enter âcâ to cancel): invystasafe.com
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for invystasafe.com
Cleaning up challenges
An unexpected error occurred:
ValueError: Unable to insert label!
Please see the logfiles in /var/log/letsencrypt for more details.
â Hereâs a link to the letsencrypt log file â
The output of apachectl -S does NOT show a virtual host for domain: invystasafe.com
You need to first make http://invystasafe.com work (correctly) before trying to make it https://
http://invystasafe.com does work (try it)⌠Since your post I have added a virtual host, but I am still having problems. Below is output from: (1) apache2ctl -S, (2) certbot --apache, (3) dig invystasafe.com (to show you the domain & ip address are registered), and (4) a link to the latest LetsEncrypt log file. I truly appreciate your support.
Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel):
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for [invystasafe.com](http://invystasafe.com/)
Waiting for verification...
Cleaning up challenges
Failed authorization procedure. [invystasafe.com](http://invystasafe.com/) (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://invystasafe.com/.well-known/acme-challenge/Yh7s-wDy0oVvAAzgz3pUFrvNu_PTL82KNfhvaENdgUo [54.219.172.188]: "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n<html><head>\n<title>401
Unauthorized</title>\n</head><body>\n<h1>Unauthorized</"
IMPORTANT NOTES:
- The following errors were reported by the server:
Domain: [invystasafe.com](http://invystasafe.com/)
Type: unauthorized
Detail: Invalid response from
http://invystasafe.com/.well-known/acme-challenge/Yh7s-wDy0oVvAAzgz3pUFrvNu_PTL82KNfhvaENdgUo
[54.219.172.188]: "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML
2.0//EN\">\n<html><head>\n<title>401
Unauthorized</title>\n</head><body>\n<h1>Unauthorized</"
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.
I didnât just say âit doesnât workâ. What I meant with âmake it may work correctlyâ is that just because âit worksâ doesnât mean it was done correctly.
You must understand that Apache will do itâs utmost to run (at any/all cost). It will ignore duplicate names, overlapping names, etc. So just because it runs doesnât mean it is âcorrectâ.
Why does it need to be âcorrectâ?
Because certbot it NOT as forgiving and doesnât understand âApache logicâ [itâs more like NGINX].
So, can we see the file: /etc/apache2/sites-enabled/000-default.conf
[in hopes of making it âcorrectâ - from all perspectives]
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
ServerName invystasafe.com
DocumentRoot "/usr/share/httpdocs/htdocs/login"
#ServerAdmin webmaster@localhost
#DocumentRoot /var/www/html
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
#ErrorLog ${APACHE_LOG_DIR}/error.log
#CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
</VirtualHost>
It seems that certbot gets caught by your "Directory /" authentication requirement.
As seen in the 1600 lines of the LE logs:
2020-01-15 16:36:02,065:DEBUG:certbot_apache.http_01:Adding a temporary challenge validation Include for name: invytasafe.com in: /etc/apache2/sites-enabled/000-default.conf
2020-01-15 16:36:02,065:DEBUG:certbot_apache.http_01:writing a pre config file with text:
RewriteEngine on
RewriteRule ^/\.well-known/acme-challenge/([A-Za-z0-9-_=]+)$ /var/lib/letsencrypt/http_challenges/$1 [END]
2020-01-15 16:36:02,065:DEBUG:certbot_apache.http_01:writing a post config file with text:
<Directory /var/lib/letsencrypt/http_challenges>
Require all granted
</Directory>
<Location /.well-known/acme-challenge>
Require all granted
</Location>
it doesn't match up with what I assume you expected:
and logs the failure as:
Domain: invystasafe.com
Type: unauthorized
Detail: Invalid response from http://invystasafe.com/.well-known/acme-challenge/aJzp4aGhfD5kfqxUZg7kWf7Lm6_x0FbZy1AzOKjcudo [54.219.172.188]: "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n<html><head>\n<title>401 Unauthorized</title>\n</head><body>\n<h1>Unauthorized</"