Page 1 of 1

Apache2 und SSL

Posted: 2004-03-01 22:48
by schl
hallo zusammen,

habe mir heute apache2 kompiliert. folgendermaßen bin ich vorgegangen:

1. installieren von openssl-0.9.7c

Code: Select all

./config shared --prefix=/usr/local/openssl-0.9.7c --openssldir=/usr/local/ssl
2. installieren von apache 2.0.48

Code: Select all

./configure --prefix=/usr/local/apache2 --enable-layout=Apache --with-mpm=prefork --enable-mods-shared=most --enable-ssl --with-ssl=/usr/local/openssl-0.9.7c
3. zertifik erstellt und in apache2 eingebunden
4. SSL in apache eingebunden -> httpd.conf

Code: Select all

<IfModule mod_ssl.c>
    Include conf/ssl.conf
</IfModule>
5. die ssl.conf schaut folgendermassen aus:

Code: Select all

<IfDefine SSL>
Listen 443
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl    .crl
SSLPassPhraseDialog  builtin
SSLSessionCache         dbm:/usr/local/apache2/logs/ssl_scache
SSLSessionCacheTimeout  300
SSLMutex  file:/usr/local/apache2/logs/ssl_mutex
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin

<VirtualHost 81.169.169.87:443>

DocumentRoot /usr/local/apache2/htdocs
ServerName www.chlvirtualwork.de:443
ErrorLog /usr/local/apache2/logs/error_log
TransferLog /usr/local/apache2/logs/access_log
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile /usr/local/apache2/conf/server.crt
SSLCertificateKeyFile /usr/local/apache2/conf/server.key

<Files ~ ".(cgi|shtml|phtml|php3?)$">
    SSLOptions +StdEnvVars
</Files>
<Directory "/usr/local/apache2/cgi-bin">
    SSLOptions +StdEnvVars
</Directory>

CustomLog /usr/local/apache2/logs/ssl_request_log 
          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x "%r" %b"

</VirtualHost>

</IfDefine>
6. virtueller host eingerichtet in httpd.conf

Code: Select all

NameVirtualHost 81.169.169.87:80

<VirtualHost 81.169.169.87:80>
    ServerAdmin webmaster@chlvirtualwork.de
    DocumentRoot /srv/www/htdocs/web1/html
    ServerName www.chlvirtualwork.de
</VirtualHost>
So, nun zum Problem:

wenn ich http://www.chlvirtualwork.de eingebe, kommt meine normale startseite. wenn ich allerdings https://www.chlvirtualwork.de eingebe, kommt: Seite nicht gefunden.

Was habe ich da übersehen?

Re: Apache2 und SSL

Posted: 2004-03-02 18:07
by schl
na hat denn niemand von euch einen apache2 mit ssl laufen?

*heul*

PS: Folgendes noch: auf Port 80 horcht der Apache, aber auch Port 443 nicht, habe das mit nmap überprüft

Re: Apache2 und SSL

Posted: 2004-03-02 18:13
by darkspirit
Lass mal die IfModule- und IfDefine-Direktiven weg und schau, ob er will..
BTW: Du willst das nicht mit nmap überprüfen, sondern mit netstat ;)

Re: Apache2 und SSL

Posted: 2004-03-02 18:28
by oxygen
Jo, das IfDefine ist zuviel... bzw. dann musst du den apache mit apachectl startssl starten

Re: Apache2 und SSL

Posted: 2004-03-02 18:41
by schl
@DarkSpirit: natürlich mit netstat - habe wohl was durcheinander gebracht :oops:

@øxygen: danke für den tip ohne IfDefine funktioniert es. vielen dank

[edit] noch ein nachtrag: es geht auch mit meiner ursprünglichen konfiguration. der apache muss eben mit apachectl startssl gestartet werden [/edit]

Re: Apache2 und SSL

Posted: 2004-03-02 19:05
by oxygen
siehe mein beitrag ;)