I am trying to use getssl to automate the certificates, running it on the webserver itself.
It's a cloud instance with multiple interfaces and split-horizon, so I have this as the ~/.getssl/getssl.cfg
file (decommented):
CA="https://acme-staging-v02.api.letsencrypt.org"
ACCOUNT_EMAIL="webmaster@jinkosystems.co.uk"
ACCOUNT_KEY_LENGTH=4096
ACCOUNT_KEY="/home/jason/.getssl/account.key"
PRIVATE_KEY_ALG="rsa"
RELOAD_CMD="systemctl reload nginx.service"
RENEW_ALLOW="30"
SERVER_TYPE="https"
CHECK_REMOTE="true"
PUBLIC_DNS_SERVER="8.8.8.8"
AUTH_DNS_SERVER="205.251.198.77"
The DNS is hosted at Amazon AWS Route53 and the AUTH_DNS_SERVER is one of the Amazon DNS servers. Is this correct?
This is my decommented ~/.getssl/jinkosystems.co.uk/getssl.cfg
file:
SANS="www.jinkosystems.co.uk"
ACL='/srv/www/jinkosystems.co.uk/web/.well-known/acme-challenge'
USE_SINGLE_ACL="true"
Now when I run getssl I get error:
% getssl jinkosystems.co.uk
jinkosystems.co.uk: DNS lookup failed for www.jinkosystems.co.uk
getssl: jinkosystems.co.uk: exiting due to config errors
^^ This is the problem I am asking about. Why can't it see the CNAME record for www.jinkosystems.co.uk?
If I comment out the SANS="www.jinkosystems.co.uk"
line, I get this:
% getssl jinkosystems.co.uk
jinkosystems.co.uk: no certificate obtained from host
Registering account
Verify each domain
Verifying jinkosystems.co.uk
copying challenge token to /srv/www/jinkosystems.co.uk/web/.well-known/acme-challenge/KAs45T-REDACTED__3giqrvZadyBJ-9IIIe0
getssl: for some reason could not reach http://jinkosystems.co.uk/.well-known/acme-challenge/KAs45T-REDACTED__3giqrvZadyBJ-9IIIe0 - please check it manually
I suspect this could be due to not having enabled the file in SELinux, but I haven't got this far yet.