PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : SSL; 2 Domains; 1 Webserver



jake
08.04.05, 10:16
Hallo leute, ich habe folgendes problem

ich habe 2 domains auf einem webserver liegen, jede domain hat einen zertifikat von trustcenter.

Das problem ist, wenn ich meinen apache starte, wird nur ein zertifikat anscheind für die beiden domains geladen.

also wenn ich auf www.dom1.com gehe ist alles okay,, ssl geht, blos wenn ich auch www.dom2.com gehe kommt eine sicherheitswarnung und es wird auch das zertifikat von www.dom1.com geladen :(

hier mal ein auszug aus meiner httpd.conf

<VirtualHost www.dom1.com:443>
DocumentRoot /u1/www/dom1/www
ServerName www.dom1.com
ServerAlias dom1.com
ErrorLog /u1/www/dom1/logs/error_log
CustomLog /u1/www/dom1/logs/transfer_log common

######## SSL ##########
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSL v2:+EXP:+eNULL
SSLCertificateFile /usr/local/apache/1.3.33/ssl/dom1.crt
SSLCertificateKeyFile /usr/local/apache/1.3.33/ssl/dom1.key
SSLCACertificatePath /usr/local/apache/1.3.33/ssl
<Files ~ "\.(cgi|shtml|phtml|php3?)$">
SSLOptions +StdEnvVars
</Files>
<Directory "/usr/local/apache/1.3.33/cgi-bin">
SSLOptions +StdEnvVars
</Directory>
SetEnvIf User-Agent ".*MSIE.*" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0

CustomLog /u1/www/dom1/logs/ssl_request_log \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
</VirtualHost>

<VirtualHost www.dom2.com:443>
DocumentRoot /u1/www/dom2/www
ServerName www.dom2.com
ServerAlias dom2.com
ErrorLog /u1/www/dom2/logs/error_log
CustomLog /u1/www/dom2/logs/transfer_log common

######## SSL ##########
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSL v2:+EXP:+eNULL
SSLCertificateFile /usr/local/apache/1.3.33/ssl/dom2.crt
SSLCertificateKeyFile /usr/local/apache/1.3.33/ssl/dom2.key
SSLCACertificatePath /usr/local/apache/1.3.33/ssl
<Files ~ "\.(cgi|shtml|phtml|php3?)$">
SSLOptions +StdEnvVars
</Files>
<Directory "/usr/local/apache/1.3.33/cgi-bin">
SSLOptions +StdEnvVars
</Directory>
SetEnvIf User-Agent ".*MSIE.*" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0

CustomLog /u1/www/dom2/logs/ssl_request_log \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"

</VirtualHost>

starten tu ich das ganze mit:
./httpd -f conf/httpd_443.conf -DSSL
bekomme auch kein fehler...

kann mit bitte jemand weiterhelfen, ist sehr wichtig, danke

marce
08.04.05, 10:26
Kam schon öfters:

ein Apache kann nur 1 Zertifikat, du brauchst also 2 Webserver (-Prozesse).

Warum steht auf der Apache-Seite / mod-ssl-Seite sehr gut erklärt.

Oder mal SuFu benutzen.

himbeere
08.04.05, 10:28
http://httpd.apache.org/docs/mod/core.html#virtualhost

Oder anders gefragt, werden denn dom1.com und dom2.com zu unterschiedlichen IP Adressen aufgelöst?

t.

marce
08.04.05, 10:50
... zusätzlich noch

http://www.modssl.org/docs/2.8/ssl_faq.html#vhosts

jake
08.04.05, 11:23
hallo,

danke schonmal für eure antworten :-)

also die domains waren nur beispiele. sie laufen alle auf einer IP

ich habe es auch schon mit 2 apache prozessen probiert
aber das geht leider nicht :(

also mit 2 configs
./httpd -f conf/httpd_443_dom1.conf -DSSL

<VirtualHost www.dom1.com:443>
DocumentRoot /u1/www/dom1/www
ServerName www.dom1.com
ServerAlias dom1.com
ErrorLog /u1/www/dom1/logs/error_log
CustomLog /u1/www/dom1/logs/transfer_log common

######## SSL ##########
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSL v2:+EXP:+eNULL
SSLCertificateFile /usr/local/apache/1.3.33/ssl/dom1.crt
SSLCertificateKeyFile /usr/local/apache/1.3.33/ssl/dom1.key
SSLCACertificatePath /usr/local/apache/1.3.33/ssl
<Files ~ "\.(cgi|shtml|phtml|php3?)$">
SSLOptions +StdEnvVars
</Files>
<Directory "/usr/local/apache/1.3.33/cgi-bin">
SSLOptions +StdEnvVars
</Directory>
SetEnvIf User-Agent ".*MSIE.*" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0

CustomLog /u1/www/dom1/logs/ssl_request_log \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
</VirtualHost>


./httpd -f conf/httpd_443_dom2.conf -DSSL

<VirtualHost www.dom2.com:443>
DocumentRoot /u1/www/dom2/www
ServerName www.dom2.com
ServerAlias dom2.com
ErrorLog /u1/www/dom2/logs/error_log
CustomLog /u1/www/dom2/logs/transfer_log common

######## SSL ##########
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSL v2:+EXP:+eNULL
SSLCertificateFile /usr/local/apache/1.3.33/ssl/dom2.crt
SSLCertificateKeyFile /usr/local/apache/1.3.33/ssl/dom2.key
SSLCACertificatePath /usr/local/apache/1.3.33/ssl
<Files ~ "\.(cgi|shtml|phtml|php3?)$">
SSLOptions +StdEnvVars
</Files>
<Directory "/usr/local/apache/1.3.33/cgi-bin">
SSLOptions +StdEnvVars
</Directory>
SetEnvIf User-Agent ".*MSIE.*" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0

CustomLog /u1/www/dom2/logs/ssl_request_log \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"

</VirtualHost>

wenn ich die 2te domain auf einen anderen port laufen lasse geht alles wunderbar, blos man muss den post immer mit eingeben, und das ist nicht die lösung die ich brauche

ich war leider zu blöd aus den howtos was raus zu lesen :(

himbeere
09.04.05, 10:28
also die domains waren nur beispiele. sie laufen alle auf einer IP

Dann brauchst Du wohl eine NameVirtualHost Directive.
http://httpd.apache.org/docs/mod/core.html#namevirtualhost

t.