# This is an example of the kind of things you can do in a configuration file. # All flags used by the client can be configured here. Run Certbot with # "--help" to learn more about the available options.
# Use a 4096 bit RSA key instead of 2048 rsa-key-size = 2048 # or 4096
# Uncomment and update to register with the specified e-mail address email = xxx@gmail.com
# Uncomment and update to generate certificates for the specified # domains. domains = my-domain, www.my-domain
# Uncomment to use a text interface instead of ncurses text = True
# Uncomment to use the standalone authenticator on port 443 # authenticator = standalone # standalone-supported-challenges = tls-sni-01
# Uncomment to use the webroot authenticator. Replace webroot-path with the # path to the public_html / webroot folder being served by your web server. authenticator = webroot webroot-path = /var/www/letsencrypt/
------------------------------------------------------------------------------- Please read the Terms of Service at https://letsencrypt.org/documents/LE- SA-v1.0.1-July-27-2015.pdf. You must agree in order to register with the ACME server at https://acme-staging.api.letsencrypt.org/directory ------------------------------------------------------------------------------- (A)gree/(C)ancel: A
IMPORTANT NOTES: - Congratulations! Your certificate and chain have been saved at /etc/letsencrypt/live/mydomain/fullchain.pem. Your cert will expire on 2016-08-12. To obtain a new version of the certificate in the future, simply run Certbot again. - If you lose your account credentials, you can recover through e-mails sent to xxx@gmail.com. - Your account credentials have been saved in your Certbot configuration directory at /etc/letsencrypt. You should make a secure backup ofthis folder now. This configuration directory will also contain certificates and private keys obtained by Certbot so making regular backups ofthis folder is ideal.
申请的证书位于/etc/letsencrypt/live/mydomain/目录下
安装证书
1 2 3 4 5 6 7 8 9
server { listen 443 ssl default_server; server_name my-domain;
$ ./certbot-auto renew --dry-run Checking fornew version... Requesting root privileges to run certbot... sudo CERTBOT_AUTO=./certbot-auto /home/guoqiang/.local/share/letsencrypt/bin/letsencrypt renew --dry-run
------------------------------------------------------------------------------- Processing /etc/letsencrypt/renewal/cucc.tazzfdc.com.conf ------------------------------------------------------------------------------- ** DRY RUN: simulating 'certbot renew' close to cert expiry ** (The test certificates below have not been saved.)
Congratulations, all renewals succeeded. The following certs have been renewed: /etc/letsencrypt/live/cucc.tazzfdc.com/fullchain.pem (success) ** DRY RUN: simulating 'certbot renew' close to cert expiry ** (The test certificates above have not been saved.)
cd /opt/certbot/ ./certbot-auto renew if \[ $? -ne 0 \]; then ERRORLOG=\`tail /var/log/letsencrypt/letsencrypt.log\` echo -e "The Let's Encrypt cert has not been renewed! \\n \\n" \\ $ERRORLOG else nginx -s reload fi exit 0