====== Certifical SSL ======
Utilisation du service "let's encrypt"
francois@maison ~]$ sudo certbot --apache
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Which names would you like to activate HTTPS for?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: blog.beafrancois.fr
2: dav.beafrancois.fr
3: maison.beafrancois.fr
4: matrix.beafrancois.fr
5: musique.beafrancois.fr
6: nuage.beafrancois.fr
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel):
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for maison.beafrancois.fr
http-01 challenge for nuage.beafrancois.fr
http-01 challenge for blog.beafrancois.fr
http-01 challenge for musique.beafrancois.fr
http-01 challenge for dav.beafrancois.fr
http-01 challenge for matrix.beafrancois.fr
Waiting for verification...
Cleaning up challenges
Deploying Certificate to VirtualHost /etc/httpd/conf/extra/httpd-vhosts.conf
Deploying Certificate to VirtualHost /etc/httpd/conf/extra/httpd-vhosts.conf
Deploying Certificate to VirtualHost /etc/httpd/conf/extra/httpd-ssl.conf
Deploying Certificate to VirtualHost /etc/httpd/conf/extra/httpd-vhosts.conf
Deploying Certificate to VirtualHost /etc/httpd/conf/extra/httpd-vhost-musique.conf
Deploying Certificate to VirtualHost /etc/httpd/conf/extra/httpd-vhost-nuage.conf
Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: No redirect - Make no further changes to the webserver configuration.
2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if you're confident your site works on HTTPS. You can undo this
change by editing your web server's configuration.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 1
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Congratulations! You have successfully enabled https://blog.beafrancois.fr,
https://dav.beafrancois.fr, https://maison.beafrancois.fr,
https://matrix.beafrancois.fr, https://musique.beafrancois.fr, and
https://nuage.beafrancois.fr
You should test your configuration at:
https://www.ssllabs.com/ssltest/analyze.html?d=blog.beafrancois.fr
https://www.ssllabs.com/ssltest/analyze.html?d=dav.beafrancois.fr
https://www.ssllabs.com/ssltest/analyze.html?d=maison.beafrancois.fr
https://www.ssllabs.com/ssltest/analyze.html?d=matrix.beafrancois.fr
https://www.ssllabs.com/ssltest/analyze.html?d=musique.beafrancois.fr
https://www.ssllabs.com/ssltest/analyze.html?d=nuage.beafrancois.fr
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/blog.beafrancois.fr/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/blog.beafrancois.fr/privkey.pem
Your cert will expire on 2018-12-17. To obtain a new or tweaked
version of this certificate in the future, simply run certbot again
with the "certonly" option. To non-interactively renew *all* of
your certificates, run "certbot renew"
- If you like Certbot, please consider supporting our work by:
Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
Donating to EFF: https://eff.org/donate-le
[francois@maison ~]$
===== Automatic renewal =====
Create a systemd ''certbot.service'':
''/etc/systemd/system/certbot.service''
[Unit]
Description=Let's Encrypt renewal
[Service]
Type=oneshot
ExecStart=/usr/bin/certbot renew --quiet --agree-tos
If you do not use a plugin to manage the web server configuration automatically, the web server has to be reloaded manually to reload the certificates each time they are renewed. This can be done by adding --deploy-hook ''systemctl reload httpd.service'' to the ExecStart command.
> Before adding a timer, check that the service is working correctly and is not trying to prompt anything.
Add a timer to check for certificate renewal twice a day and include a randomized delay so that everyone's requests for renewal will be spread over the day to lighten the Let's Encrypt server load [2]:
''/etc/systemd/system/certbot.timer''
[Unit]
Description=Twice daily renewal of Let's Encrypt's certificates
[Timer]
OnCalendar=0/12:00:00
RandomizedDelaySec=1h
Persistent=true
[Install]
WantedBy=timers.target
Enable and start certbot.timer.
Ajouter un sous-domaine
sudo certbot -d blog.beafrancois.fr,dav.beafrancois.fr,maison.beafrancois.fr,service.beafrancois.fr,musique.beafrancois.fr,nuage.beafrancois.fr,fichiers.beafrancois.fr,git.beafrancois.fr,wiki.beafrancois.fr,shell.beafrancois.fr --expand