Automating Let's Encrypt HTTPS certificate renewals on Namecheap hosts
bryan d3860e9a29 Initial commit | il y a 4 ans | |
---|---|---|
multisites | il y a 4 ans | |
README.md | il y a 4 ans | |
acme-cpanel-dns.sh | il y a 4 ans | |
acme-cpanel-webroot.sh | il y a 4 ans | |
domains.txt | il y a 4 ans |
This project contains two files:
acme-cpanel-webroot.sh
(for webroot challenges)
acme-cpanel-dns.sh
(for dns challenges, legacy script)
Both of these scripts read in a list of domains from one or more files. These files may only contain domains and empty lines (see domains.txt
).
acme-cpanel-webroot.sh
may require the following additions to .htaccess so that challenges are not automatically redirected to https:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^\.well-known/.+ - [END]
Command-line (Linux):
scp ./* username@ip:port:~
ssh user@ip -p port
chmod +x $HOME/acme-cpanel-webroot.s
$HOME/acme-cpanel-webroot.sh -s multisites
)crontab -l
cPanel:
chmod +x $HOME/acme-cpanel-webroot.sh
$HOME/acme-cpanel-webroot.sh -s multisites
)./acme-cpanel-webroot.sh [OPTIONS] [FILES...]
--email, -e EMAIL
E-mail not be notified of certificate renewal failures
--keep-grouping, -k
Issue multidomain certificates based on grouping by input file
The first domain in each file will be used to determine the shared webroot
Default: issue certificates by independent domain
--sites-dir, -s DIR
Load domain list files from this directory
--force, -f
Override default debug
--debug, -d (default)
Use --staging to issue certificates and do not deploy
./acme-cpanel-webroot.sh --force
Load sites from domains.txt, issue and deploy certificates
./acme-cpanel-webroot.sh --force -s multisites
Load sites from multisites directory, issue and deploy certificates
./acme-cpanel-webroot.sh --force -k multisites/flatwhitedesign.pw multisites/greengingerdesign.pw
Load sites from multisites directory, issue and deploy multidomain certificates based on the grouping in the file.
./acme_cpanel_dns.sh
This is a legacy script that takes no arguments. By default it will read all domain lists in a top-level "multisites" directory.