Automating Let's Encrypt HTTPS certificate renewals on Namecheap hosts
bryan 1f063f2501 Fix permissions bit | 4 years ago | |
---|---|---|
multisites | 4 years ago | |
README.md | 4 years ago | |
acme-cpanel-dns.sh | 4 years ago | |
acme-cpanel-webroot.sh | 4 years ago | |
domains.txt | 4 years ago |
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.