Dernière mise à jour Dimanche 17 Février 2019 • 837 consultations

Let's Encrypt est un service qui vous propose de créer gratuitement un certificat SSL pour votre domaine.
Pour faciliter encore plus la démarche, on va utiliser Certbot, voilà la méthode générale pour Debian Stretch

Préparation


Il faut installer Certbot, et pour cela nous allons ajouter les stretch-backports dans la liste des dépôts

# nano /etc/apt/sources.list

Ajouter le dépôt à la suite du fichier.

deb http://ftp.debian.org/debian stretch-backports main

On met à jour les dépôts et on installe certbot.

# apt-get update
# apt-get install python-certbot-apache -t stretch-backports


On met en place le certificat Let's Encrypt

# certbot --authenticator webroot --installer apache

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator webroot, Installer apache
Enter email address (used for urgent renewal and security notices) (Enter 'c' to
cancel): email@domaine.net

-------------------------------------------------------------------------------
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf. You must
agree in order to register with the ACME server at
https://acme-v01.api.letsencrypt.org/directory
-------------------------------------------------------------------------------
(A)gree/(C)ancel: A

-------------------------------------------------------------------------------
Would you be willing to share your email address with the Electronic Frontier
Foundation, a founding partner of the Let's Encrypt project and the non-profit
organization that develops Certbot? We'd like to send you email about our work
encrypting the web, EFF news, campaigns, and ways to support digital freedom.
-------------------------------------------------------------------------------
(Y)es/(N)o: N

Which names would you like to activate HTTPS for?
-------------------------------------------------------------------------------
1: domaine.net
2: www.domaine.net
-------------------------------------------------------------------------------
Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel): 1 2

Obtaining a new certificate
Performing the following challenges:
http-01 challenge for domaine.net
http-01 challenge for www.domaine.net
Input the webroot for domaine.net: (Enter 'c' to cancel): /var/www/html/domaine/www

Select the webroot for www.domaine.net:
-------------------------------------------------------------------------------
1: Enter a new webroot
2: /var/www/html/domaine/www
-------------------------------------------------------------------------------
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2

Waiting for verification...
Cleaning up challenges
Created an SSL vhost at /etc/apache2/sites-enabled/domaine-le-ssl.conf
Enabled Apache socache_shmcb module
Enabled Apache ssl module
Deploying Certificate to VirtualHost /etc/apache2/sites-enabled/domaine-le-ssl.conf
Deploying Certificate to VirtualHost /etc/apache2/sites-enabled/domaine-le-ssl.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): 2

Redirecting vhost in /etc/apache2/sites-enabled/domaine.conf to ssl vhost in /etc/apache2/sites-enabled/domaine-le-ssl.conf

------------------------------------------------------------------------------
Congratulations! You have successfully enabled https://achat-poire.com and
https://www.domaine.net

You should test your configuration at:
https://www.ssllabs.com/ssltest/analyze.html?d=domaine.net
https://www.ssllabs.com/ssltest/analyze.html?d=www.domaine.net
-------------------------------------------------------------------------------

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/domaine.net/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/domaine.net/privkey.pem
   Your cert will expire on 2019-01-12. 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"
 - Your account credentials have been saved in your Certbot
   configuration directory at /etc/letsencrypt. You should make a
   secure backup of this folder now. This configuration directory will
   also contain certificates and private keys obtained by Certbot so
   making regular backups of this folder is ideal.
 - 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





Poster un commentaire
Pseudo: (*)
email:
Site web:
Commentaire: (*)
* obligatoire

Les commentaires sont visualisés avant publication
^haut