Keywords: LAMP/MAMP/WAMP - AWS - How to - Other
Currently I am running Bitnami Drupal Lamp stack and using the Lego client to generate the SSL certificates automatically. The problem is that those certs are not generating using HTTP if the site has Cloudfront in front of it. So my goal is to generate the certs using DNS challenge.
Currently I am running a crontab job for each domain:
"sudo lego --email="firstname.lastname@example.org" --domains="www.domain.net" --path="/etc/lego" renew"
So this does not work if the domain points to Cloudfront DNS name, but works if the domain is pointed to this server.
So how should I use the Lego script with DNS challenge, I tried this and it does not work:
"sudo lego --email="email@example.com" --domains="www.domain.net" --path="/etc/lego" --dns run"
If I understood correctly, by using the Lego script with DNS challenge, I will get a TXT record for the domain which I need to insert first in the Domain records before I can continue to get the certificates. Also If I understand this correctly, when renewing the cert, I do not again need to install the TXT record because it is always same?
So what should I put in the "--dns" part to make the Lego script working with DNS challenge. I have all my domains in a domain provider which is not in the list of supported, but I can insert the TXT record manually so that should not be a problem.