Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // To install
- mkdir /home/acme.sh
- cd /home/acme.sh
- git init
- git remote add origin https://github.com/acmesh-official/acme.sh
- git pull origin master
- rm -r .* *.md Dockerfile
- chmod -R 777 .
- bash *.sh --install --cert-home /etc/letsencrypt/archive
- mkdir /etc/letsencrypt
- mkdir /etc/letsencrypt/live
- ## Now shut down Apache2
- systemctl stop apache2
- domain=MY_DOMAIN # Replace MY_DOMAIN with your domain
- eccdomain=MY_DOMAIN_ecc # Replace only MY_DOMAIN with your domain
- mkdir /etc/letsencrypt/live/$domain
- # Getting certs
- ## Standalone (Syntax: domain.tld) (Includes only the main domain, no subdomains) (Requires no domain authendification)
- bash /home/acme.sh/acme.sh --server letsencrypt --issue --domain $domain --standalone \
- --cert-file /etc/letsencrypt/live/$domain/cert.pem \
- --key-file /etc/letsencrypt/live/$domain/privkey.pem \
- --fullchain-file /etc/letsencrypt/live/$domain/fullchain.pem
- ## Wildcard (Syntax: *.domain.tld) (Includes only subdomains, not the main domain) (Requires domain authendification)
- bash /home/acme.sh/acme.sh --server letsencrypt --issue --domain *.$domain --dns --yes-I-know-dns-manual-mode-enough-go-ahead-please \
- --cert-file /etc/letsencrypt/live/$domain/cert.pem \
- --key-file /etc/letsencrypt/live/$domain/privkey.pem \
- --fullchain-file /etc/letsencrypt/live/$domain/fullchain.pem
- # Renew certs
- ## Wildcard
- bash /home/acme.sh/acme.sh --server letsencrypt --renew --domain *.$domain --dns --yes-I-know-dns-manual-mode-enough-go-ahead-please
- ## For renewing domains after requesting for wildcards
- cp /etc/letsencrypt/archive/*.$eccdomain/*.$domain.cer /etc/letsencrypt/live/$domain/cert.pem
- cp /etc/letsencrypt/archive/*.$eccdomain/*.$domain.key /etc/letsencrypt/live/$domain/privkey.pem
- cp /etc/letsencrypt/archive/*.$eccdomain/fullchain.cer /etc/letsencrypt/live/$domain/fullchain.pem
- ## Now that the certificate(s) have been requested, restart Apache2:
- systemctl start apache2
- // To uninstall
- rm -r /home/acme.sh /root/.acme.sh
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement