Skip to main content

Einrichtung und Anleitung (Apache)

Installation

Getestet wurde das Programm unter Ubuntu 14.04

  1. Hinzufügen des certbot-Repositories
    add-apt-repository ppa:certbot/certbot
  2. Aktualisieren des Repositories
    apt-get update
  3. Installieren der certbot-Software
    apt-get install python-certbot-apache

Erstellen eines Zertifikates

apache

Noch nicht getestet

standalone

Noch nicht getestet

webroot

Für die Erstellung eines Zertifikates für webroot ist es von Nöten das root-Verzeichnisses der Webseite für die Subdomain zu kennen.
Dieses sollte zuerst notiert, bzw. in die Zwischenablage kopiert werden.

Beispieldaten:

Beispieldaten
Subdomain sub.domain.name
root-Verzeichnis /absolute/path/to/web/root

Durchführung:

  1. Befehl ausführen

    root@web:~# certbot certonly
    Saving debug log to /var/log/letsencrypt/letsencrypt.log
     
    How would you like to authenticate with the ACME CA?
    -------------------------------------------------------------------------------
    1: Apache Web Server plugin - Beta (apache)
    2: Spin up a temporary webserver (standalone)
    3: Place files in webroot directory (webroot)
    -------------------------------------------------------------------------------
    Select the appropriate number [1-3] then [enter] (press 'c' to cancel): 3
  2. Anschließend die Subdomain eingeben, für die das Zertifikat gelten soll
    Please enter in your domain name(s) (comma and/or space separated)  (Enter 'c'
    to cancel):sub.domain.name
    Obtaining a new certificate
    Performing the following challenges:
    http-01 challenge for sub.domain.name
  3. Folgende Option mit 1 bestätigen
    Select the webroot for sub.domain.name:
    -------------------------------------------------------------------------------
    1: Enter a new webroot
    -------------------------------------------------------------------------------
    Press 1 [enter] to confirm the selection (press 'c' to cancel): 1
  4. Nun das root-Verzeichnis angeben, welches certbot benötigt, um die Validierung der Domain durchzuführen
    Input the webroot for sub.domain.name: (Enter 'c' to cancel):/absolute/path/to/web/root
    Waiting for verification...
    Cleaning up challenges
    
    IMPORTANT NOTES:
     - Congratulations! Your certificate and chain have been saved at
       /etc/letsencrypt/live/sub.domain.name/fullchain.pem. Your cert
       will expire on 2017-09-20. To obtain a new or tweaked version of
       this certificate in the future, simply run certbot again. 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

Besonderheiten

Umleitung auf HTTPS

Die Umleitung auf HTTPS für Let's Encrypt kann die Verifizierung durch den Let's Encry-Server erschweren.
Sollte die Fehlermeldung kommen, dass auf die URL https://sub.domain.name.well-known/* nicht zugegriffen werden konnte, so könnte der Redirect auf HTTPS falsch sein.
Zu beachten ist, dass am Ende der Subdomain immer ein "/" steht.

  Redirect / https://sub.domain.name/

.well-known-Ordner bei ProxyPass

Möchte man ein Zertifikat für einen VHost erstellen, welcher mit ProxyPass auf einen anderen Server im Netzwerk verweist, so kann dies unter Umständen zu Problemen führen.
Hierzu muss man dem Proxy sagen, dass der Pfad "/.well-known" nicht geroutet werden soll.

  ProxyPass /.well-known !
  ProxyPass / http://sub.domain.name/
  ProxyPassReverse / http://sub.domain.name/
  <Proxy *>
    Order deny,allow
    Allow from all
  </Proxy>

  DocumentRoot "/path/to/local/directory/"

  Alias "/.well-known" "/path/to/local/directory/.well-known"
  <Directory "/path/to/local/directory/">
    Require all granted
  </Directory>