User Tools

Site Tools


tuto:selfhosting_ssl

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
tuto:selfhosting_ssl [2019-05-10 14:06] Emilientuto:selfhosting_ssl [2019-05-10 14:16] Emilien
Line 8: Line 8:
 sudo apt install certbot sudo apt install certbot
 </code> </code>
-Puis lancez certbot.+ 
 +Puis lancez certbot  (en remplaçant "votredomaine.org" par votre nom de domaine).
  
 <code bash> <code bash>
Line 19: Line 20:
 </code> </code>
 Validez ensuite dans ''%%certbot%%''. Vos clés et certificats sont alors dans le répertoire ''%%/etc/letsencrypt/live/votredomaine.org/%%'' . Validez ensuite dans ''%%certbot%%''. Vos clés et certificats sont alors dans le répertoire ''%%/etc/letsencrypt/live/votredomaine.org/%%'' .
 +
 +Votre certificat est au path  (en remplaçant "votredomaine.org" par votre nom de domaine) "/etc/letsencrypt/live/votredomaine.org/"
 +
 +Il faut éditer la configuration générale de Nginx, ouvrez le fichier /etc/nginx/nginx.conf
 +<code>
 +sudo nano /etc/nginx/nginx.conf
 +</code>
 +
 +à la fin du bloc http, on remplace nos deux lignes :
 +<code>
 + # Custom
 + ssl_certificate /tmp/domain.crt;
 + ssl_certificate_key /tmp/domain.key;
 +</code>
 +
 +par (en remplaçant "votredomaine.org" par votre nom de domaine) :
 +<code>
 + # Custom
 + ssl_certificate /etc/letsencrypt/live/votredomaine.org/fullchain.pem;
 + ssl_certificate_key /etc/letsencrypt/live/votredomaine.org/privkey.pem;
 +</code>
  
tuto/selfhosting_ssl.txt · Last modified: 2023-02-02 22:06 by 127.0.0.1