LetsEncrypt: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Keine Bearbeitungszusammenfassung |
|||
| (Eine dazwischenliegende Version desselben Benutzers wird nicht angezeigt) | |||
| Zeile 7: | Zeile 7: | ||
</pre> | </pre> | ||
== nginx-Konfiguration == | == nginx-Konfiguration == | ||
Wichtig: muss schon unter HTTPS laufen | |||
* /etc/nginx/sites-enabled/default | * /etc/nginx/sites-enabled/default | ||
<pre>location ~ /.well-known { | <pre>location ~ /.well-known { | ||
| Zeile 12: | Zeile 13: | ||
} | } | ||
</pre> | </pre> | ||
<pre> | <pre>URL=wiki.hamatoma.de | ||
URL=wiki.hamatoma.de | |||
ROOT=/var/www/html | ROOT=/var/www/html | ||
test -d $ROOT || mkdir $ROOT/.well-known && chmod uog+rwx $ROOT/.well-known | |||
systemctl reload nginx | |||
certbot certonly -a webroot --webroot-path=$ROOT -d $URL -d www.$URL | certbot certonly -a webroot --webroot-path=$ROOT -d $URL -d www.$URL | ||
</pre> | |||
== Einbinden des Zerifikats == | |||
<pre> ssl_certificate /etc/letsencrypt/live/wiki.hamatoma.de/fullchain.pem; | |||
ssl_certificate_key /etc/letsencrypt/live/wiki.hamatoma.de/privkey.pem; | |||
</pre> | </pre> | ||
Aktuelle Version vom 21. Mai 2017, 20:15 Uhr
Installation
[Bearbeiten]Debian 8
[Bearbeiten]echo 'deb http://ftp.debian.org/debian jessie-backports main' | sudo tee /etc/apt/sources.list.d/backports.list apt-get update apt-get install certbot -t jessie-backports
nginx-Konfiguration
[Bearbeiten]Wichtig: muss schon unter HTTPS laufen
- /etc/nginx/sites-enabled/default
location ~ /.well-known {
allow all;
}
URL=wiki.hamatoma.de ROOT=/var/www/html test -d $ROOT || mkdir $ROOT/.well-known && chmod uog+rwx $ROOT/.well-known systemctl reload nginx certbot certonly -a webroot --webroot-path=$ROOT -d $URL -d www.$URL
Einbinden des Zerifikats
[Bearbeiten] ssl_certificate /etc/letsencrypt/live/wiki.hamatoma.de/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/wiki.hamatoma.de/privkey.pem;