[jetty-user] Ssl on jetty
2009-10-05 12:59:58 GMT
I installed Ubuntu Server 9.04. Then I ‘ve configured Jetty 5. Now I want to run SSL on jetty. A webapplication runs on jetty and requires a login at a defined point.
Now (with SSL) the Login page should change from http to https , to encode the login data.
I used this tutorial to configure SSL for Jetty but something went wrong. http://jetty.mortbay.org/jetty5/faq/faq_s_400-Security_t_ssl.html <http://jetty.mortbay.org/jetty5/faq/faq_s_400-Security_t_ssl.html>
After I created the keystore with this command (keytool -keystore keystore -alias jetty -genkey -keyalg RSA) I made some changes in the „jetty.xml“ file.
These 2 codeblocks include the changes I made:
<Call name="addListener">
<Arg>
<New class="org.mortbay.http.SocketListener">
<Set name="Port"><SystemProperty name="jetty.port" default="8280"/></Set>
<Set name="MinThreads">10</Set>
<Set name="MaxThreads">100</Set>
<Set name="MaxIdleTimeMs">30000</Set>
<Set name="LowResourcePersistTimeMs">5000</Set>
<Set name="ConfidentialPort">8443</Set>
<Set name="IntegralPort">8443</Set>
</New>
</Arg>
<Call name="addListener">
<Arg>
<New class="org.mortbay.http.SunJsseListener">
<Set name="Port">8443</Set>
<Set name="MinThreads">5</Set>
<Set name="MaxThreads">100</Set>
<Set name="MaxIdleTimeMs">30000</Set>
<Set name="LowResourcePersistTimeMs">2000</Set>
<Set name="Keystore">/etc/jetty/keystore</Set>
<!-- <Set name="Keystore"><SystemProperty name="jetty.home" default="."/>/keystore</Set> -->
<Set name="Password">changeit</Set>
<Set name="KeyPassword">changeit</Set>
</New>
</Arg>
</Call>
Now if I type http://hostname:8280/ into the browser address field (of course I used the right hostname instead of the default one) the following message is shown in the browser: {{Error 404 - Not Found. No context on this server matched or handled this request. Contexts known to this server are:
The links above may not work if a virtual host is configured}}
If I try to enter http://hostname:8280/ ,after I completely uncommented the SunJsseListener Codeblock , the Jetty start page appears at least in my browser window.This should tell me that jetty is configured well.
Maybe it is helpful for you if I say that when I execute “netstat –a” it is shown that Port 8280 has the STATE LISTEN.
My assumption is that I probably made a mistake in the SunJsseListener Codeblock but I don’t know what.
Maybe it is another mistake.
It would be very nice if someone can help me.
Thank you in advance.
RSS Feed