zeroblue2005
Goto Top

Xampp Apache lässt kein SSL zu

Hallo Zusammen,

ich habe auf meinem Server 2003 das Xampp 1.1.2.0 am laufen. Würde auch gerne ein Update machen, jedoch habe ich schiss, dass mir der Xampp um die Ohren fliegt und nachher Garnichts mehr geht! Auch deshalb, weil ich gesehen habe, dass die HTTPD.conf bei der neuen Version ganz anders aufgebaut ist. Ich hoffe einfach mal, dass ich mir keine Sicherheitslücke reinhaue. Obwohl ich gerade ein ganz schlechtes gewissen haben face-wink. Wenn jemand mir ne Anleitung gibt, wie ich alle Einstellungen behalten kann ohne die HTTPD.conf komplett neu schreiben zu müssen (Virtual Hosting) usw. bin ich sehr dankbar.

Aber zurück zu meinem Problem: Wenn ich das richtig gelesen habe, kann der Xampp automatisch SSL und in der neuere Versionen habe ich das lokal ausprobiert, läuft das auch und die auch wenn die Zertifikate vom Browser als nicht ganz koscher angesehen werden, reagiert der Webserver bei https://localhost
darauf.

Bei meiner HTTPD.conf Version ist das Modul: #LoadModule ssl_module modules/mod_ssl.so auskommentiert, schalte ich das Modul ein, startet der Apache nicht mehr. Meine Frage warum macht er das? In den Logs kann ich nichts finden. Gibt es noch eine Conf, die anpassen muss?

Danke Mike

Content-Key: 108910

Url: https://administrator.de/contentid/108910

Printed on: April 23, 2024 at 12:04 o'clock

Member: knut4linux
knut4linux Feb 13, 2009 at 10:59:48 (UTC)
Goto Top
moinsen,

hast du mal geschaut, ob du überhaupt ssl zertifikate hast?? Wenn ja, hast du den Verweis auf diese Zertifikate auch in die httpd-ssl.conf eingetragen?? Wenn diese Datei nicht vorhanden ist, dann reicht eigentlich ein simples include in die httpd.conf

Gruß, Knut
Member: zeroblue2005
zeroblue2005 Feb 13, 2009 at 11:17:44 (UTC)
Goto Top
Hi Knut,

danke für deine schnelle Antwort. Ja Zertifikate sind da, da bin ich mir eigentlich sicher. Im Ordner Apache/conf/ gibt es die Subordner:

ssl.crl
ssl.crt
ssl.csr
ssl.key
ssl.prm

Im Ordner conf liegt auch die: httpd-ssl.conf

In jedem der Subordner sind jede menge Dateien drin vom Typ.*.crt und *.csr so wie *.key Solle also stimmen.

Wo muss ich den den Verweis setzen in derhttpd-ssl.conf eintragen? Das ganze sieht bei mir so aus:

#
  1. This is the Apache server configuration file providing SSL support.
  2. It contains the configuration directives to instruct the server how to
  3. serve pages over an https connection. For detailing information about these
  4. directives see <URL:http://httpd.apache.org/docs-2.0/mod/mod_ssl.html>;
  5. Do NOT simply read the instructions in here without understanding
  6. what they do. They're here only as hints or reminders. If you are unsure
  7. consult the online docs. You have been warned.
#

#
  1. Pseudo Random Number Generator (PRNG):
  2. Configure one or more sources to seed the PRNG of the SSL library.
  3. The seed data should be of good random quality.
  4. WARNING! On some platforms /dev/random blocks if not enough entropy
  5. is available. This means you then cannot use the /dev/random device
  6. because it would lead to very long connection times (as long as
  7. it requires to make more entropy available). But usually those
  8. platforms additionally provide a /dev/urandom device which doesn't
  9. block. So, if available, use this one instead. Read the mod_ssl User
  10. Manual for more details.
#
  1. Note: This must come before the <IfDefine SSL> container to support
  2. starting without SSL on platforms with no /dev/random equivalent
  3. but a statically compiled-in mod_ssl.
#
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
#SSLRandomSeed startup file:/dev/random 512
#SSLRandomSeed startup file:/dev/urandom 512
#SSLRandomSeed connect file:/dev/random 512
#SSLRandomSeed connect file:/dev/urandom 512

#
  1. When we also provide SSL we have to listen to the
  2. standard HTTP port (see above) and to the HTTPS port
#
  1. Note: Configurations that use IPv6 but not IPv4-mapped addresses need two
  2. Listen directives: "Listen [::]:443" and "Listen 0.0.0.0:443"
#
Listen 443

##
## SSL Global Context
##
## All SSL configuration in this context applies both to
## the main server and all SSL-enabled virtual hosts.
##

#
  1. Some MIME-types for downloading Certificates and CRLs
#
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl .crl

  1. Pass Phrase Dialog:
  2. Configure the pass phrase gathering process.
  3. The filtering dialog program (`builtin' is a internal
  4. terminal dialog) has to provide the pass phrase on stdout.
SSLPassPhraseDialog builtin

  1. Inter-Process Session Cache:
  2. Configure the SSL Session Cache: First the mechanism
  3. to use and second the expiring timeout (in seconds).
#SSLSessionCache none
#SSLSessionCache shmht:logs/ssl_scache(512000)
#SSLSessionCache shmcb:logs/ssl_scache(512000)
SSLSessionCache dbm:logs/ssl_scache
SSLSessionCacheTimeout 300

  1. Semaphore:
  2. Configure the path to the mutual exclusion semaphore the
  3. SSL engine uses internally for inter-process synchronization.
SSLMutex default

##
## SSL Virtual Host Context
##

<VirtualHost _default_:443>
  1. <VirtualHost 127.0.0.1:443>

  1. General setup for the virtual host
DocumentRoot "C:/apachefriends/xampp/htdocs"
ServerName localhost:443
ServerAdmin you@your.address
DocumentRoot "C:/apachefriends/xampp/htdocs"
ErrorLog logs/sslerror.log

  1. SSL Engine Switch:
  2. Enable/Disable SSL for this virtual host.
SSLEngine on

  1. SSL Cipher Suite:
  2. List the ciphers that the client is permitted to negotiate.
  3. See the mod_ssl documentation for a complete list.
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL

  1. Server Certificate:
  2. Point SSLCertificateFile at a PEM encoded certificate. If
  3. the certificate is encrypted, then you will be prompted for a
  4. pass phrase. Note that a kill -HUP will prompt again. A test
  5. certificate can be generated with `make certificate' under
  6. built time. Keep in mind that if you've both a RSA and a DSA
  7. certificate you can configure both in parallel (to also allow
  8. the use of DSA ciphers, etc.)
  9. SSLCertificateFile "C:/apachefriends/xampp/apache/conf/ssl.crt/snakeoil-rsa.crt"
SSLCertificateFile "C:/apachefriends/xampp/apache/conf/ssl.crt/server.crt"
  1. SSLCertificateFile "C:/apachefriends/xampp/apache/conf/ssl.crt/server.csr"
  2. SSLCertificateFile C:/Apache/conf/ssl.crt/server-dsa.crt

  1. Server Private Key:
  2. If the key is not combined with the certificate, use this
  3. directive to point at the key file. Keep in mind that if
  4. you've both a RSA and a DSA private key you can configure
  5. both in parallel (to also allow the use of DSA ciphers, etc.)
  6. SSLCertificateKeyFile "C:/apachefriends/xampp/apache/conf/ssl.key/snakeoil-rsa.key"
SSLCertificateKeyFile "C:/apachefriends/xampp/apache/conf/ssl.key/server.key"
  1. SSLCertificateKeyFile C:/Apache/conf/ssl.key/server-dsa.key

  1. Server Certificate Chain:
  2. Point SSLCertificateChainFile at a file containing the
  3. concatenation of PEM encoded CA certificates which form the
  4. certificate chain for the server certificate. Alternatively
  5. the referenced file can be the same as SSLCertificateFile
  6. when the CA certificates are directly appended to the server
  7. certificate for convinience.
  8. SSLCertificateChainFile C:/Apache/conf/ssl.crt/ca.crt

  1. Certificate Authority (CA):
  2. Set the CA certificate verification path where to find CA
  3. certificates for client authentication or alternatively one
  4. huge file containing all of them (file must be PEM encoded)
  5. Note: Inside SSLCACertificatePath you need hash symlinks
  6. to point to the certificate files. Use the provided
  7. Makefile to update the hash symlinks after changes.
  8. SSLCACertificatePath C:/Apache/conf/ssl.crt
  9. SSLCACertificateFile C:/Apache/conf/ssl.crt/ca-bundle.crt

  1. Certificate Revocation Lists (CRL):
  2. Set the CA revocation path where to find CA CRLs for client
  3. authentication or alternatively one huge file containing all
  4. of them (file must be PEM encoded)
  5. Note: Inside SSLCARevocationPath you need hash symlinks
  6. to point to the certificate files. Use the provided
  7. Makefile to update the hash symlinks after changes.
  8. SSLCARevocationPath C:/Apache/conf/ssl.crl
  9. SSLCARevocationFile C:/Apache/conf/ssl.crl/ca-bundle.crl

  1. Client Authentication (Type):
  2. Client certificate verification type and depth. Types are
  3. none, optional, require and optional_no_ca. Depth is a
  4. number which specifies how deeply to verify the certificate
  5. issuer chain before deciding the certificate is not valid.
  6. SSLVerifyClient require
  7. SSLVerifyDepth 10

  1. Access Control:
  2. With SSLRequire you can do per-directory access control based
  3. on arbitrary complex boolean expressions containing server
  4. variable checks and other lookup directives. The syntax is a
  5. mixture between C and Perl. See the mod_ssl documentation
  6. for more details.
  7. <Location />
  8. SSLRequire ( %{SSL_CIPHER} !~ m/^(EXP|NULL)/ \
  9. and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \
  10. and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \
  11. and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \
  12. and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20 ) \
  13. or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/
  14. </Location>

  1. SSL Engine Options:
  2. Set various options for the SSL engine.
  3. o FakeBasicAuth:
  4. Translate the client X.509 into a Basic Authorisation. This means that
  5. the standard Auth/DBMAuth methods can be used for access control. The
  6. user name is the `one line' version of the client's X.509 certificate.
  7. Note that no password is obtained from the user. Every entry in the user
  8. file needs this password: `xxj31ZMTZzkVA'.
  9. o ExportCertData:
  10. This exports two additional environment variables: SSL_CLIENT_CERT and
  11. SSL_SERVER_CERT. These contain the PEM-encoded certificates of the
  12. server (always existing) and the client (only existing when client
  13. authentication is used). This can be used to import the certificates
  14. into CGI scripts.
  15. o StdEnvVars:
  16. This exports the standard SSL/TLS related `SSL_*' environment variables.
  17. Per default this exportation is switched off for performance reasons,
  18. because the extraction step is an expensive operation and is usually
  19. useless for serving static content. So one usually enables the
  20. exportation for CGI and SSI requests only.
  21. o CompatEnvVars:
  22. This exports obsolete environment variables for backward compatibility
  23. to Apache-SSL 1.x, mod_ssl 2.0.x, Sioux 1.0 and Stronghold 2.x. Use this
  24. to provide compatibility to existing CGI scripts.
  25. o StrictRequire:
  26. This denies access when "SSLRequireSSL" or "SSLRequire" applied even
  27. under a "Satisfy any" situation, i.e. when it applies access is denied
  28. and no other module can change it.
  29. o OptRenegotiate:
  30. This enables optimized SSL connection renegotiation handling when SSL
  31. directives are used in per-directory context.
  32. SSLOptions +FakeBasicAuth +ExportCertData +CompatEnvVars +StrictRequire
<FilesMatch "\.(cgi|shtml|phtml|php|php5|php4|php3?)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory "C:/apachefriends/xampp/cgi-bin">
SSLOptions +StdEnvVars
</Directory>


  1. SSL Protocol Adjustments:
  2. The safe and default but still SSL/TLS standard compliant shutdown
  3. approach is that mod_ssl sends the close notify alert but doesn't wait for
  4. the close notify alert from client. When you need a different shutdown
  5. approach you can use one of the following variables:
  6. o ssl-unclean-shutdown:
  7. This forces an unclean shutdown when the connection is closed, i.e. no
  8. SSL close notify alert is send or allowed to received. This violates
  9. the SSL/TLS standard but is needed for some brain-dead browsers. Use
  10. this when you receive I/O errors because of the standard approach where
  11. mod_ssl sends the close notify alert.
  12. o ssl-accurate-shutdown:
  13. This forces an accurate shutdown when the connection is closed, i.e. a
  14. SSL close notify alert is send and mod_ssl waits for the close notify
  15. alert of the client. This is 100% SSL/TLS standard compliant, but in
  16. practice often causes hanging connections with brain-dead browsers. Use
  17. this only for browsers where you know that their SSL implementation
  18. works correctly.
  19. Notice: Most problems of broken clients are also related to the HTTP
  20. keep-alive facility, so you usually additionally want to disable
  21. keep-alive for those clients, too. Use variable "nokeepalive" for this.
  22. Similarly, one has to force some clients to use HTTP/1.0 to workaround
  23. their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and
  24. "force-response-1.0" for this.
SetEnvIf User-Agent ".*MSIE.*" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0

  1. Per-Server Logging:
  2. The home of a custom SSL log file. Use this when you want a
  3. compact non-error SSL logfile on a virtual host .
  4. CustomLog C:/apachefriends/xampp/logs/ssl_request_log \
  5. "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"

</VirtualHost>
Member: knut4linux
knut4linux Feb 13, 2009 at 12:02:17 (UTC)
Goto Top
ok, die Pfade passen.

ich weiß jetzt nicht, wie das mit xampp unter Windows aussieht. Aber hast du beim starten des Servers den Parameter ssl mit gegeben? (lampp start ssl)?
Member: zeroblue2005
zeroblue2005 Feb 13, 2009 at 12:14:36 (UTC)
Goto Top
Mit Parameter meinst du die Zeile hier in der httpd.conf oder?

#LoadModule ssl_module modules/mod_ssl.so

wenn ich das "#" wegnehmen und neustarte kommt ein Fehler, dass ist ja mein Problem. die mod_ssl.so Datei ist vorhanden und da habe ich auch nicht geändert!

Apache läuft als Dienst: "C:\Apachefriends\xampp\apache\bin\Apache.exe" -k runservice
Member: knut4linux
knut4linux Feb 13, 2009 at 13:31:32 (UTC)
Goto Top
Apache läuft als Dienst: "C:\Apachefriends\xampp\apache\bin\Apache.exe" -k runservice

an dieser Stelle musst du ihn auch den Parameter übergeben, dass er mit ssl zu starten hat

Zum besseren verständnis, wie es bei mir (allerdings Linux) ist

./lampp start -> startet Apache, SQL-Server, FTP -> ohne SSL
./lampp start ssl -> startet den Server mit SSL
Member: zeroblue2005
zeroblue2005 Feb 13, 2009 at 13:49:57 (UTC)
Goto Top
Hi,

ne du das geht bei Windows nicht! Im Systemdienst kann ich Parameter gar nicht anpassen. Habe deshalb mal den Dienst deinstalliert und dann versucht den Parameter in der Dienst Install zu ändern (:

@echo off

if "%OS%" == "Windows_NT" goto WinNT

:Win9X
echo Don't be stupid! Win9x don't know Services
echo Please use apache_start.bat instead
goto exit

:WinNT
echo Installing Apache2 as an Service
bin\apache -k install
echo Now we Start Apache2 face-smile
net start Apache2

:exit
pause


Ja und was soll ich dir sagen, den Parameter -ssl gibt es für Windows Apache nicht!