Erstellen Sie anhand der folgenden Beispiele und Anweisungen in der Datei
httpd.conf eine Zeilengruppe für den virtuellen SSL-Host.
LoadModule ibm_ssl_module modules/mod_ibm_ssl.so
<IfModule mod_ibm_ssl.c>
Listen 443
<VirtualHost *:443>
SSLEnable
</VirtualHost>
</IfModule>
SSLDisable
KeyFile "c:/Program Files/IBM HTTP Server/key.kdb"
Wichtig: Geben Sie zusammen mit der Listen-Anweisung immer die Adresse mit dem Port an. Fügen Sie beispielsweise für den Empfang
am IPv4-Port 443 die Anweisung "Listen" mit der Standardadresse "0.0.0.0" in der Datei "httpd.conf" hinzu:
Listen 0.0.0.0:443.
Das zweite Beispiel geht davon aus, dass Sie eine
einzelne Website für SSL aktivieren und der Servername von dem Servernamen abweicht, der auf globaler Ebene für
für Anforderungen ohne SSL (Port 80) definiert ist.
Beide Hostnamen müssen in einem Domänennamensserver an gesonderten IP-Adressen registriert werden. Außerdem müssen
Sie beide IP-Adressen auf lokalen Netzschnittstellenkarten konfigurieren.
Listen 80
ServerName www.mycompany.com
<Directory "c:/Program Files/IBM HTTP Server/htdocs">
Options Indexes
AllowOverride None
order allow,deny
allow from all
<Directory>
DocumentRoot "c:/program files/ibm http server/htdocs"
DirectoryIndex index.html
<VirtualHost 192.168.1.103:80>
ServerName www.mycompany2.com
<Directory "c:/Program Files/IBM HTTP Server/htdocs2">
Options Indexes
AllowOverride None
order allow,deny
allow from all
</Directory>
DocumentRoot "c:/program files/ibm http server/htdocs2"
DirectoryIndex index2.html
</VirtualHost>
Listen 443
<VirtualHost 192.168.1.103:443>
ServerName www.mycompany2.com
SSLEnable
SSLClientAuth None
<Directory "c:/Program Files/IBM HTTP Server/htdocs2">
Options Indexes
AllowOverride None
order allow,deny
allow from all
</Directory>
DocumentRoot "c:/program files/ibm http server/htdocs2"
DirectoryIndex index2.html
</VirtualHost>
SSLDisable
KeyFile "c:/program files/ibm http server/key.kdb"
SSLV2Timeout 100
SSLV3Timeout 1000
Dieses dritte Beispiel geht davon aus, dass Sie mehrere
Websites für SSL aktivieren. Alle Hostnamen müssen im Domänennamensserver (DNS) an gesonderten IP-Adressen registriert sein.
Außerdem müssen Sie alle IP-Adressen auf einer lokalen Netzschnittstellenkarte konfigurieren.
Geben Sie mit der Anweisung SSLServerCert an, welches persönliche Serverzertifikat in der
Schlüsseldatenbank während des SSL-Handshake für die jeweilige Website an den Clientbrowser übergeben
werden soll.
Wenn Sie die Anweisung SSLServerCert nicht definieren, übergibt IBM HTTP Server das Zertifikat in der Schlüsseldatenbankdatei,
das mit einem Stern (*) als Standardschlüssel gekennzeichnet ist. Listen 80
ServerName www.mycompany.com
<Directory "c:/Program Files/IBM HTTP Server/htdocs">
Options Indexes
AllowOverride None
order allow,deny
allow from all
</Directory>
DocumentRoot "c:/program files/ibm http server/htdocs"
DirectoryIndex index.html
<VirtualHost 192.168.1.103:80>
ServerName www.mycompany2.com
<Directory "c:/Program Files/IBM HTTP Server/htdocs2">
Options Indexes
AllowOverride None
order allow,deny
allow from all
</Directory>
DocumentRoot "c:/program files/ibm http server/htdocs2"
DirectoryIndex index2.html
</VirtualHost>
<VirtualHost 192.168.1.104:80>
ServerName www.mycompany3.com
<Directory "c:/Program Files/IBM HTTP Server/htdocs3">
Options Indexes
AllowOverride None
order allow,deny
allow from all
</Directory>
DocumentRoot "c:/program files/ibm http server/htdocs3"
DirectoryIndex index3.html
</VirtualHost>
Listen 443
<VirtualHost 192.168.1.102:443>
ServerName www.mycompany.com
SSLEnable
SSLClientAuth None
SSLServerCert mycompany
<Directory "c:/Program Files/IBM HTTP Server/htdocs">
Options Indexes
AllowOverride None
order allow,deny
allow from all
</Directory>
DocumentRoot "c:/program files/ibm http server/htdocs"
DirectoryIndex index.html
</VirtualHost>
<VirtualHost 192.168.1.103:443>
ServerName www.mycompany2.com
SSLEnable
SSLClientAuth None
SSLServerCert mycompany2
<Directory "c:/Program Files/IBM HTTP Server/htdocs2">
Options Indexes
AllowOverride None
order allow,deny
allow from all
</Directory>
DocumentRoot "c:/program files/ibm http server/htdocs2"
DirectoryIndex index2.html
</VirtualHost>
<VirtualHost 192.168.1.104:443>
ServerName www.mycompany3.com
SSLEnable
SSLClientAuth None
SSLServerCert mycompany3
<Directory "c:/Program Files/IBM HTTP Server/htdocs3">
Options Indexes
AllowOverride None
order allow,deny
allow from all
</Directory>
DocumentRoot "c:/program files/ibm http server/htdocs3"
DirectoryIndex index3.html
</VirtualHost>
SSLDisable
KeyFile "c:/program files/ibm http server/key.kdb"
SSLV2Timeout 100
SSLV3Timeout 1000