HowTo SSL Apache2

aus TruBlus Wiki
Wechseln zu: Navigation, Suche

Mein eigenes kleines HowTo, wie man mit openssl Schlüssel und Zertifikate für den 2.xer-Apachen von Hand erstellt (also ohne Skripte)

Inhaltsverzeichnis

OpenSSL

Key + Zertifikatsanfrage erstellen

z.B. für CAcert

openssl req -newkey rsa:1024 -subj /CN=<your sever's address here> \
-nodes -keyout server.key\
-out server.csr -days 1095

Key erstellen

openssl genrsa -out server.key 4096

Zertifikat erstellen

(selbstsigniert)

openssl req -x509 -new -key server.key -out server.cert -days 365

Zertifikatsantrag

openssl req -new -key server.key -out server.csr

Zertifikat ausstellen

(als Trustcenter-Ersatz) Braucht Vorbereitung, vgl. man ca

openssl ca -in server.csr -out server.cert

Apache2

# SSL (START)
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/.cert
SSLCertificateKeyFile /etc/apache2/ssl/.key

SSLProtocol all
SSLCipherSuite HIGH:MEDIUM
# SSL (ENDE)
Meine Werkzeuge