hallo zusammen,
hat jemand ein beispiel für einen vhost-eintrag, wenn es sich um eine ssl-präsenz handelt.
es sollen mehrere ssl-vhosts nebeneinander existieren können. allerdings mit verschiedenen ip's!
vielen dank für eure hoffentlich zahlreichen tipps!
beste grüße
björn
VHosts für SSL
-
pfalzpower
- Posts: 90
- Joined: 2003-10-28 22:37
- Location: Karlsruhe
Re: VHosts für SSL
simples Beispiel mal im Netz gefunden
Die anderen Optionen (Servername, Logfiles, suExex, etc) wie gewohnt setzen
Code: Select all
<VirtualHost 123.123.123.123:443>
DocumentRoot /pfad/zum/docroot/
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateKeyFile /pfad/zum/zertifikat.key
SSLCertificateFile /pfad/zum/zertifikat.crt
</VirtualHost>
mein Beispiel
hatte vorher immer folgende vhosts gesetzt:
---
<VirtualHost xyz>
RewriteEngine on
RewriteRule ^/(.*) https://www.xyz.de [R]
</VirtualHost>
<VirtualHost xyz:443>
ServerAlias xyz.de http://www.xyz.de
DocumentRoot /home/web/domains/xyz.de/htdocs
ScriptAlias /cgi-bin/ /home/web/domains/xyz.de/htdocs/cgi-bin/
TransferLog /home/web/domains/xyz.de/logs/access.log
ErrorLog /home/web/domains/xyz.de/logs/error.log
SSLEngine on
SSLCertificateFile /etc/httpd/ssl.crt/xyz.de.crt
SSLCertificateKeyFile /etc/httpd/ssl.key/xyz.de.key
BrowserMatch MSIE ssl-unclean-shutdown nokeepalive downgrade-1.0 force-response-1.0
</VirtualHost>
---
leider funktioniert das nur beim ersten zertifikat. wo liegt denn da wirklich der hase begraben?
---
<VirtualHost xyz>
RewriteEngine on
RewriteRule ^/(.*) https://www.xyz.de [R]
</VirtualHost>
<VirtualHost xyz:443>
ServerAlias xyz.de http://www.xyz.de
DocumentRoot /home/web/domains/xyz.de/htdocs
ScriptAlias /cgi-bin/ /home/web/domains/xyz.de/htdocs/cgi-bin/
TransferLog /home/web/domains/xyz.de/logs/access.log
ErrorLog /home/web/domains/xyz.de/logs/error.log
SSLEngine on
SSLCertificateFile /etc/httpd/ssl.crt/xyz.de.crt
SSLCertificateKeyFile /etc/httpd/ssl.key/xyz.de.key
BrowserMatch MSIE ssl-unclean-shutdown nokeepalive downgrade-1.0 force-response-1.0
</VirtualHost>
---
leider funktioniert das nur beim ersten zertifikat. wo liegt denn da wirklich der hase begraben?
Anmerkung
im übrigen haben beide zertifikate 2 verschiedene key-files, die einzeln funktionieren. das darf es doch nicht als grund sein, oder?
-
pfalzpower
- Posts: 90
- Joined: 2003-10-28 22:37
- Location: Karlsruhe
Re: VHosts für SSL
Bei deinem VirtualHost Aufruf, ist xyz der Domainname oder die IP-Adresse?
Why can't I use SSL with name-based/non-IP-based virtual hosts?
The reason is very technical. Actually it's some sort of a chicken and egg problem: The SSL protocol layer stays below the HTTP protocol layer and encapsulates HTTP. When an SSL connection (HTTPS) is established Apache/mod_ssl has to negotiate the SSL protocol parameters with the client. For this mod_ssl has to consult the configuration of the virtual server (for instance it has to look for the cipher suite, the server certificate, etc.). But in order to dispatch to the correct virtual server Apache has to know the Host HTTP header field. For this the HTTP request header has to be read. This cannot be done before the SSL handshake is finished. But the information is already needed at the SSL handshake phase. Bingo!
SSL-VHosts mit IP
dort gebe ich die beiden IP's an! jede in einer eigenen VirtualHost-Sektion.
<VirtualHost 123.123.123.123:443>
<VirtualHost 123.123.123.123:443>
-
pfalzpower
- Posts: 90
- Joined: 2003-10-28 22:37
- Location: Karlsruhe
Re: VHosts für SSL
Poste mal bitte beide Einträge.
Was und wohin leitet die Rewrite Regel?
Was und wohin leitet die Rewrite Regel?
rewrite
beide einträge sind identisch. die rewrite soll sicherstellen, dass normale seitenaufrufe automatisch auf den ssl-port gelenkt werden.