Automating Let's Encrypt HTTPS certificate renewals on Namecheap hosts
bryan b8c904bbf3 Refactor issue certs | 4 rokov pred | |
---|---|---|
multisites | 4 rokov pred | |
README.md | 4 rokov pred | |
acme-cpanel.sh | 4 rokov pred | |
domains.txt | 4 rokov pred |
acme-cpanel.sh
reads in a list of domains from one or more files. These files may only contain domains and empty lines (see domains.txt
for example format).
"www." subdomains will be added automatically (do not add them to the domains file list).
The --method webroot
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.sh
$HOME/acme-cpanel.sh -s multisites
)crontab -l
cPanel:
chmod +x $HOME/acme-cpanel.sh
$HOME/acme-cpanel.sh -s multisites
)./acme-cpanel.sh [OPTIONS] [FILES...]
--method, -m dns,webroot
Choose the authentication method (default: dns)
--email, -e EMAIL
E-mail to be notified of certificate renewal failures
--group-by-file, -g
Issue multidomain certificates for all domains with the same webroot, grouped by input file
The first domain in each file will be used to determine the shared webroot
--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.sh --force
Load sites from domains.txt, issue and deploy certificates using the webroot method
./acme-cpanel.sh --method dns --force -s multisites
Load sites from multisites directory, issue and deploy certificates using the dns method
./acme-cpanel.sh --force -g multisites/flatwhitedesign.pw multisites/greengingerdesign.pw
Load sites from multisites directory, issue and deploy multidomain certificates with same webroot based on the grouping in the file using the webroot method