Manually create a Lets Encrypt wildcard certificate¶
sudo dnf -y install certbot
sudo certbot certonly --manual --preferred-challenges dns -d "*.[ hostname ]" -d [ hostname ]
Sample output¶
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please deploy a DNS TXT record under the name:
_acme-[ hostname ].
with the following value:
[ hash_id ]
Before continuing, verify the TXT record has been deployed. Depending on the DNS
provider, this may take some time, from a few seconds to multiple minutes. You can
check if it has finished deploying with aid of online tools, such as the Google
Admin Toolbox: https://[ hostname ]/apps/dig/#TXT/_acme-[ hostname ].
Look for one or more bolded line(s) below the line ';ANSWER'. It should show the
value(s) you've just added.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Add a Namecheap TXT record¶
Wait for record to be propagated¶
dig TXT [ hostname ]
dig TXT [ hostname ] @short
or
https://[ hostname ]/apps/dig/#TXT/_acme-[ hostname ]
# /etc/nginx/conf.d/[ hostname ]
server {
listen 80;
server_name [ hostname ];
return 301 https://$host$request_uri;
}
# HTTPS server block
server {
listen 443 ssl;
server_name [ hostname ];
ssl_certificate /etc/letsencrypt/live/[ hostname ]/[ hostname ];
ssl_certificate_key /etc/letsencrypt/live/[ hostname ]/[ hostname ];
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers HIGH:!aNULL:!MD5;
location / {
root /usr/share/nginx/html;
index [ hostname ] [ hostname ];
}
}