You need (from sources)
- The Webroot method requires HTTP on port 80 for Certbot to validate.
- The Server Name must match that of it's corresponding DNS.
- Permissions may need to be altered on the host to allow read-access to http://domain.tld/.well-known.
How I've created and configured Certbot, SSL Cert and Nginx :
Command to create the certs
certbot certonly --webroot \
--webroot-path /usr/share/nginx/html \
--renew-by-default -d <YOUR_HOST_NAME.COM> \
--config-dir ~/.certbot/config \
--logs-dir ~/.certbot/logs \
--work-dir ~/.certbot/work
In my nginx conf,
location ^~ /.well-known/acme-challenge/ {
allow all;
root /var/lib/letsencrypt/;
default_type "text/plain";
try_files $uri =404;
}
In Apache, create a new file
/etc/httpd/conf/extra/httpd-acme.conf
Alias /.well-known/acme-challenge/ "/var/lib/letsencrypt/.well-known/acme-challenge/"
<Directory "/var/lib/letsencrypt/">
AllowOverride None
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
Require method GET POST OPTIONS
</Directory>
and include in /etc/httpd/conf/httpd.conf
References