Letsencrypt: Unterschied zwischen den Versionen

Aus xinux.net
Zur Navigation springen Zur Suche springen
Zeile 17: Zeile 17:
 
*/usr/local/sbin/certbot-auto renew  --no-self-upgrade --dry-run --force-renewal --pre-hook "systemctl stop apache2.service" --post-hook "systemctl start apache2.service
 
*/usr/local/sbin/certbot-auto renew  --no-self-upgrade --dry-run --force-renewal --pre-hook "systemctl stop apache2.service" --post-hook "systemctl start apache2.service
  
 +
=Apache2 Example=
 +
<pre>
 +
SSLCertificateFile /etc/letsencrypt/live/www.example.com/fullchain.pem
 +
SSLCertificateKeyFile /etc/letsencrypt/live/www.example.com/privkey.pem
 +
SSLCertificateChainFile /etc/apache2/ssl/lets-encrypt-x3-cross-signed.pem
 +
Include /etc/letsencrypt/options-ssl-apache.conf
 +
</pre>
 
=Cron Examples=
 
=Cron Examples=
 
==restart service==
 
==restart service==
Zeile 24: Zeile 31:
 
==specified domain==
 
==specified domain==
 
*/usr/local/sbin/certbot-auto certonly -n --apache -d www.xxxx-xx.de --post-hook  --post-hook "service apache2 start"
 
*/usr/local/sbin/certbot-auto certonly -n --apache -d www.xxxx-xx.de --post-hook  --post-hook "service apache2 start"
 +
 
=systemctl=
 
=systemctl=
 
*/usr/local/sbin/certbot-auto renew  --no-self-upgrade --pre-hook "systemctl stop apache2.service" --post-hook "systemctl start apache2.service
 
*/usr/local/sbin/certbot-auto renew  --no-self-upgrade --pre-hook "systemctl stop apache2.service" --post-hook "systemctl start apache2.service

Version vom 12. März 2017, 15:58 Uhr

Install

Real Install

  • certbot-auto certonly

Dry Run

  • certbot-auto renew --dry-run


  • /usr/local/sbin/certbot-auto renew --no-self-upgrade --dry-run --force-renewal --pre-hook "systemctl stop apache2.service" --post-hook "systemctl start apache2.service

Apache2 Example

 SSLCertificateFile /etc/letsencrypt/live/www.example.com/fullchain.pem
 SSLCertificateKeyFile /etc/letsencrypt/live/www.example.com/privkey.pem
 SSLCertificateChainFile /etc/apache2/ssl/lets-encrypt-x3-cross-signed.pem
 Include /etc/letsencrypt/options-ssl-apache.conf

Cron Examples

restart service

  • /usr/local/sbin/certbot-auto renew --quiet --no-self-upgrade --post-hook "service apache2 restart" >> /var/log/letsencrypt.log 2>&1

stop and start service

  • /usr/local/sbin/certbot-auto renew --quiet --no-self-upgrade --pre-hook "service apache2 stop" --post-hook "service apache2 start" >> /var/log/letsencrypt.log 2>&1

specified domain

  • /usr/local/sbin/certbot-auto certonly -n --apache -d www.xxxx-xx.de --post-hook --post-hook "service apache2 start"

systemctl

  • /usr/local/sbin/certbot-auto renew --no-self-upgrade --pre-hook "systemctl stop apache2.service" --post-hook "systemctl start apache2.service

Don't forget to Backup this Directory because there are you Accountdata

  • /etc/letsencrypt

Links