Site Tools


linux:ubuntu:certbot

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
linux:ubuntu:certbot [2018/06/03 04:41] lunetikklinux:ubuntu:certbot [2018/12/13 09:28] (current) – [nginx] lunetikk
Line 15: Line 15:
 ==== nginx ==== ==== nginx ====
  
-Good guide for nginx config and cronjob for auto renew+Good guide for nginx config and cronjob for auto renew\\
 [[https://gist.github.com/cecilemuller/a26737699a7e70a7093d4dc115915de8]] [[https://gist.github.com/cecilemuller/a26737699a7e70a7093d4dc115915de8]]
  
Line 31: Line 31:
 <code>include /etc/nginx/letsencrypt/letsencrypt.conf;</code> <code>include /etc/nginx/letsencrypt/letsencrypt.conf;</code>
  
-Create a folder for challanges+Create a folder for challenges
 <code>mkdir -p /usr/local/nginx/html/letsencrypt/.well-known/acme-challenge</code> <code>mkdir -p /usr/local/nginx/html/letsencrypt/.well-known/acme-challenge</code>
  
Line 59: Line 59:
 SSLCertificateChainFile /etc/letsencrypt/live/lunetikk.de/fullchain.pem SSLCertificateChainFile /etc/letsencrypt/live/lunetikk.de/fullchain.pem
 </code> </code>
 +
 +===== Automation =====
 +
 +Create a script for automation
 +
 +<code>
 +#!/bin/bash
 +/usr/bin/certbot renew --renew-hook "service apache2 reload" > /var/log/certbot-renew.log
 +mail -s "CERTBOT Renewals" <YOURMAILADDRESS> < /var/log/certbot-renew.log
 +DATE=`date +%Y-%m-%d`
 +mv /var/log/certbot-renew.log /var/log/certbot-renew_%DATE.log
 +exit 0
 +</code>
 +
 +Add to your crontab
 +
 +<code>@daily /bin/certbotrenew.sh</code>
  
 ===== Commands ===== ===== Commands =====
linux/ubuntu/certbot.1527993708.txt.gz · Last modified: 2018/06/03 04:41 by lunetikk