Benutzer-Werkzeuge

Webseiten-Werkzeuge


lets_encrypt

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
lets_encrypt [19.11.2021 10:57] – [Erstinstallation] thoogelets_encrypt [20.11.2023 17:13] (aktuell) thooge
Zeile 16: Zeile 16:
 </code> </code>
   - Account-Schlüssel anlegen<code>   - Account-Schlüssel anlegen<code>
 +cd /var/www/lets_encrypt
 openssl genrsa 2048 > account.key openssl genrsa 2048 > account.key
 chmod 400 account.key chmod 400 account.key
Zeile 21: Zeile 22:
   - Domainschlüssel anlegen<code>   - Domainschlüssel anlegen<code>
 openssl genrsa 2048 > /etc/ssl/private/<domain>.key openssl genrsa 2048 > /etc/ssl/private/<domain>.key
-chmod 640 <domain>.key+chmod 640 /etc/ssl/private/<domain>.key
 </code> </code>
   - SAN-Konfiguration erstellen, SAN können über die Angabe einer Konfigurationsdatei mit Optionen eingestellt werden. Beachte, daß die Hauptdomain ebenfalls in die Liste der SAN eingeschlossen wird. <file conf domain-san.conf>   - SAN-Konfiguration erstellen, SAN können über die Angabe einer Konfigurationsdatei mit Optionen eingestellt werden. Beachte, daß die Hauptdomain ebenfalls in die Liste der SAN eingeschlossen wird. <file conf domain-san.conf>
Zeile 40: Zeile 41:
 </file> </file>
   - CSR erstellen<code>   - CSR erstellen<code>
-openssl req -new -sha256 -key <domain>.key -subj "/CN=<domain1>" -config <domain>-san.conf > <domain>.csr+openssl req -new -sha256 -key /etc/ssl/private/<domain>.key 
 +    -subj "/CN=<domain1>" -config <domain>-san.conf > <domain>.csr
 chmod 640 <domain>.csr chmod 640 <domain>.csr
 </code> </code>
Zeile 49: Zeile 51:
 mkdir challenges mkdir challenges
 chmod 750 challenges chmod 750 challenges
-chown www-datachallenges+chgrp www-data challenges
 </code> </code>
     * Lighttpd:<file conf /etc/lighttpd/lighttpd.conf>     * Lighttpd:<file conf /etc/lighttpd/lighttpd.conf>
Zeile 57: Zeile 59:
  url.redirect = (  url.redirect = (
  "^/\.well-known/acme-challenge/.*" => "",  "^/\.well-known/acme-challenge/.*" => "",
- "^/(.*)" => "https://ras.rowa-group.com/$1"+ "^/(.*)" => "https://www.example.com/$1"
  )  )
 } }
Zeile 82: Zeile 84:
 chmod 640 <domain>.crt chmod 640 <domain>.crt
 </code> </code>
-  - Zertifikat ind Schlüssel an Zielposition ablegen<code>+  - Zertifikat an Zielposition ablegen<code>
 cp -p <domain>.crt /etc/ssl/certs/ cp -p <domain>.crt /etc/ssl/certs/
-mv <domain>.key /etc/ssl/private/ 
 </code> </code>
   - Anschließend Zertifikat und Schlüssel im der entsprechenden Webserverkonfiguration einbauen   - Anschließend Zertifikat und Schlüssel im der entsprechenden Webserverkonfiguration einbauen
Zeile 103: Zeile 104:
  
   - Erneuertes Zertifikat anfordern<code>   - Erneuertes Zertifikat anfordern<code>
-./acme_tiny.py --account-key ./account.key --csr ./<domain>.csr --acme-dir /var/www/lets_encrypt/challenges/./<domain>.crt+cd /var/www/lets_encrypt 
 +acme-tiny --account-key account.key --csr <domain>.csr --acme-dir /var/www/lets_encrypt/challenges/ > <domain>.crt
 chmod 640 <domain>.crt chmod 640 <domain>.crt
 </code> </code>
-  - Intermediate Zertifikat holen und anfügen<code>+  - ggf. Intermediate Zertifikat holen und anfügen<code>
 wget -O - https://letsencrypt.org/certs/lets-encrypt-x3-cross-signed.pem > intermediate.pem wget -O - https://letsencrypt.org/certs/lets-encrypt-x3-cross-signed.pem > intermediate.pem
 cat intermediate.pem >> <domain>.crt cat intermediate.pem >> <domain>.crt
 </code> </code>
   - Zertifikat ind Schlüssel an Zielposition ablegen<code>   - Zertifikat ind Schlüssel an Zielposition ablegen<code>
-cp <domain>.crt /etc/ssl/certs/+cp -p <domain>.crt /etc/ssl/certs/
 </code> </code>
   - Neuladen der Serverkonfiguration<code>   - Neuladen der Serverkonfiguration<code>
lets_encrypt.1637315842.txt.gz · Zuletzt geändert: 19.11.2021 10:57 von thooge

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki