Moin
Auf unserem Tomcat hatte ich für HTTPS bisher eine selbstsigniertes Zertifikat verwendet und das hat soweit auch funktioniert. Da aber 1&1 bei unserem Webserver ein kostenloses Zertifikat mitliefert, möchte ich nun das verwenden.
Ich hab jetzt also ein 'certificate' und ein 'privateKey' jeweils als txt-Datei vorliegen. Das Zertifikat hab ich mit OpenSSL, wie hier beschrieben, ins Binärformat umgewandelt. Dann das alte Zertifikat mit 'keytool -delete ...' gelöscht. Und das neue Zertifikat mit
keytool -importcert -trustcacerts -alias tomcat -storepass passwort -keystore .keystore -file 'DER-Zertifikat'
importiert.
keytool -list gibt nun folgendes aus:
In server.xml steht folgendes:
Beim Start von Tomcat steht folgendes in catalina.log:
Problem? Es funktioniert schlicht nicht. Beim Aufruf von https passiert nichts, keine Fehlermeldung, Exception oder sonst was.
ieHTTPHeaders liefert auf das GET ein "HTTP/1.1 302 Moved Temporarily". LiveHTTPHeaders in Firefox zeigt nicht mal das GET.
Ersetze ich .keystore durch die gesicherte Version mit dem selbstsigniertem Zertifikat funktioniert alles ... Was mach ich also falsch?
thx & cu boesi
Auf unserem Tomcat hatte ich für HTTPS bisher eine selbstsigniertes Zertifikat verwendet und das hat soweit auch funktioniert. Da aber 1&1 bei unserem Webserver ein kostenloses Zertifikat mitliefert, möchte ich nun das verwenden.
Ich hab jetzt also ein 'certificate' und ein 'privateKey' jeweils als txt-Datei vorliegen. Das Zertifikat hab ich mit OpenSSL, wie hier beschrieben, ins Binärformat umgewandelt. Dann das alte Zertifikat mit 'keytool -delete ...' gelöscht. Und das neue Zertifikat mit
keytool -importcert -trustcacerts -alias tomcat -storepass passwort -keystore .keystore -file 'DER-Zertifikat'
importiert.
keytool -list gibt nun folgendes aus:
Code:
Keystore-Typ: JKS
Keystore-Provider: SUN
Ihr Keystore enthõlt 1 Eintrag/-õge.
Aliasname: tomcat
Erstellungsdatum: 20.10.2008
Eintragstyp: trustedCertEntry
...
Code:
<Connector port="443" SSLEnabled="true" protocol="org.apache.coyote.http11.Http11NioProtocol"
maxThreads="150" scheme="https" secure="true"
keystoreFile="Pfad/zu/.keystore" keystorePass="passwort"
clientAuth="false" sslProtocol="TLS" />
Code:
20.10.2008 13:57:11 org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.12.
20.10.2008 13:57:11 org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
20.10.2008 13:57:12 org.apache.coyote.http11.Http11AprProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-80
20.10.2008 13:57:12 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
20.10.2008 13:57:12 org.apache.coyote.http11.Http11NioProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-443
20.10.2008 13:57:12 org.apache.coyote.ajp.AjpAprProtocol init
INFO: Initializing Coyote AJP/1.3 on ajp-8009
20.10.2008 13:57:12 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1187 ms
20.10.2008 13:57:12 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
20.10.2008 13:57:12 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.18
20.10.2008 13:57:13 org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
20.10.2008 13:57:13 org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
20.10.2008 13:57:13 org.apache.coyote.http11.Http11AprProtocol start
INFO: Starting Coyote HTTP/1.1 on http-80
20.10.2008 13:57:13 org.apache.coyote.http11.Http11NioProtocol start
INFO: Starting Coyote HTTP/1.1 on http-443
20.10.2008 13:57:13 org.apache.coyote.ajp.AjpAprProtocol start
INFO: Starting Coyote AJP/1.3 on ajp-8009
20.10.2008 13:57:13 org.apache.catalina.startup.Catalina start
INFO: Server startup in 866 ms
ieHTTPHeaders liefert auf das GET ein "HTTP/1.1 302 Moved Temporarily". LiveHTTPHeaders in Firefox zeigt nicht mal das GET.
Ersetze ich .keystore durch die gesicherte Version mit dem selbstsigniertem Zertifikat funktioniert alles ... Was mach ich also falsch?
thx & cu boesi