Doing domain validation in this way is the only way to obtain wildcard certificates from Let’s Encrypt
install certbot-auto
curl -O https://dl.eff.org/certbot-auto
modify certbot-auto
# find the following lineelif [ -f /etc/redhat-release ]; then# replace that line with the following lineelif [ -f /etc/redhat-release ] || grep 'cpe:.*:amazon_linux:2' /etc/os-release > /dev/null 2>&1; then
move certbot-auto
mv certbot-auto /usr/local/bin/certbot-auto
switch to root user (NOTE - keeps the $PATH)
sudo su -
generate certificate for “*.marcuschiu.com” and “marcuschiu.com”
... installing dependenciesSaving debug log to /var/log/letsencrypt/letsencrypt.logPlugins selected: Authenticator manual, Installer None- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Would you be willing to share your email address with the Electronic FrontierFoundation, a founding partner of the Let's Encrypt project and the non-profitorganization that develops Certbot? We'd like to send you email about our workencrypting the web, EFF news, campaigns, and ways to support digital freedom.- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -(Y)es/(N)o: YObtaining a new certificatePerforming the following challenges:dns-01 challenge for marcuschiu.comdns-01 challenge for marcuschiu.com- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -NOTE: The IP of this machine will be publicly logged as having requested thiscertificate. If you're running certbot in manual mode on a machine that is notyour server, please ensure you're okay with that.Are you OK with your IP being logged?- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -(Y)es/(N)o: Y- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Please deploy a DNS TXT record under the name_acme-challenge.marcuschiu.com with the following value:sRPiL8X_c22jj8k6PsodZsL0W-fT-xUKDolvDHNXKfcBefore continuing, verify the record is deployed.- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Press Enter to ContinueWaiting for verification...Cleaning up challengesIMPORTANT NOTES: - Congratulations! Your certificate and chain have been saved at: /etc/letsencrypt/live/marcuschiu.com/fullchain.pem Your key file has been saved at: /etc/letsencrypt/live/marcuschiu.com/privkey.pem Your cert will expire on 2020-09-26. To obtain a new or tweaked version of this certificate in the future, simply run certbot-auto again. To non-interactively renew *all* of your certificates, run "certbot-auto renew" - If you like Certbot, please consider supporting our work by: Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate Donating to EFF: https://eff.org/donate-le