Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

Diese Anleitung erzeugt ein selbst signiertes Zertifikat für den haproxy Dienst.

...

Code Block
titlePrüfen
openssl x509 -in /etc/ssl/newkey/cert.pem -text -noout


# Prüfen ob bei diesen Eintrag alle DNS Namen stehen:
# X509v3 Subject Alternative Name:

Kombinierte .pem erzeugen und kopieren

Code Block
titleKombinierte PEM
cat /etc/ssl/newkey/cert.key > /etc/ssl/newkey/comb.pem
cat /etc/ssl/newkey/cert.pem >> /etc/ssl/newkey/comb.pem
cp /etc/ssl/newkey/comb.pem /etc/haproxy/haproxy.pem
chmod 400 /etc/haproxy/haproxy.pem

Zertifikat in haproxy.cfg eintragen und Frontendkonfiguration auf umleitung anpassen

Code Block
titleKombinierte PEM
#
# Frontend http leitet auf https um
#
frontend acdportal_http
        mode            http
        bind            :80
        redirect        scheme https if !{ ssl_fc }

#
# Frontend für https mit Zertifikat
#
frontend acdportal_https
        mode            http
        bind            :443 ssl crt /etc/sslhaproxy/newkey/combhaproxy.pem  #verify optional
...