Running Nginx with a Let’s Encrypt certificate
Before requesting a certificate, point the domain’s A and/or AAAA records to working addresses, allow inbound TCP ports 80 and 443, and make Nginx serve the correct hostname.
nginx -t
systemctl enable --now nginx
curl -I http://host.example.com/
Install Certbot from a supported distribution or upstream package source and use its Nginx integration, or configure another ACME client. After issuance, verify the exact hostname, certificate chain, redirect, and automated renewal:
certbot renew --dry-run
If an AAAA record exists, Let’s Encrypt may validate over IPv6. Remove or correct a broken record rather than repeatedly retrying issuance and hitting rate limits.