AW: [jetty-user] Configuration Problem with vhosts
"Cramer, Markus" <[email protected]> Wed, 18 May 2011 08:20:18 +0200
| Newsgroups | gmane.comp.java.jetty.support |
|---|---|
| Message-ID | <[email protected]> |
Hello Jan and hello mailinglist ;),
I think I've tried something like that. But here is my Jetty.xml-Configuration for the connectors, because I'm not sure if I have did it in the right way:
------------------------------------------
<Call name="addConnector">
<Arg>
<New class="org.mortbay.jetty.nio.SelectChannelConnector">
<Set name="host"><SystemProperty name="jetty.host" /></Set>
<Set name="port"><SystemProperty name="jetty.port" default="8080"/></Set>
<Set name="maxIdleTime">30000</Set>
<Set name="Acceptors">4</Set>
<Set name="statsOn">false</Set>
<Set name="confidentialPort">8443</Set>
<Set name="lowResourcesConnections">20000</Set>
<Set name="lowResourcesMaxIdleTime">5000</Set>
</New>
</Arg>
</Call>
<Call name="addConnector">
<Arg>
<New class="org.mortbay.jetty.security.SslSocketConnector">
<Set name="Port">8888</Set>
<Set name="maxIdleTime">30000</Set>
<Set name="keystore"><SystemProperty name="jetty.home" default="." />/etc/certificates/admin_keystore</Set>
<Set name="password">strongpassword</Set>
<Set name="keyPassword">strongpassword </Set>
<Set name="NeedClientAuth">true</Set>
<Set name="truststore"><SystemProperty name="jetty.home" default="." />/etc/certificates/truststore</Set>
<Set name="trustPassword"> strongpassword </Set>
<Set name="name">both</Set>
</New>
</Arg>
</Call>
<Call name="addConnector">
<Arg>
<New class="org.mortbay.jetty.security.SslSocketConnector">
<Set name="Port">8443</Set>
<Set name="maxIdleTime">30000</Set>
<Set name="keystore"><SystemProperty name="jetty.home" default="." />/etc/certificates/certb</Set>
<Set name="password">strongpassword</Set>
<Set name="keyPassword"> strongpassword </Set>
<Set name="truststore"><SystemProperty name="jetty.home" default="." />/etc/certificates/truststore</Set>
<Set name="trustPassword">strongpassword</Set>
<Set name="name">webappBconn</Set>
</New>
</Arg>
</Call>
<Call name="addConnector">
<Arg>
<New class="org.mortbay.jetty.security.SslSocketConnector">
<Set name="Port">8444</Set>
<Set name="maxIdleTime">30000</Set>
<Set name="keystore"><SystemProperty name="jetty.home" default="." />/etc/certificates/certc</Set>
<Set name="password">strongpassword</Set>
<Set name="keyPassword">strongpassword</Set>
<Set name="truststore"><SystemProperty name="jetty.home" default="." />/etc/certificates/truststore</Set>
<Set name="trustPassword">strongpassword</Set>
<Set name="name">webappCconn</Set>
</New>
</Arg>
</Call>
-----------------------------------------------
Now here is an example of my context-file for webappB:
-----------------------------------------------
<Configure class="org.mortbay.jetty.webapp.WebAppContext">
<Set name="contextPath">/</Set>
<Set name="war"><SystemProperty name="jetty.home" default="."/>/webapps/webappA</Set>
<Set name="virtualHosts">
<Array type="java.lang.String">
<Item>www.b.com</Item>
<Item>b.com</Item>
<Item>b.b.b.b</Item>
</Array>
</Set>
<Set name="connectorNames">
<Array type="String">
<Item>both</Item>
<Item>webappBconn</Item>
</Array>
</Set>
</Configure>
----------------------------------------------
Is here something missing?
Greetings,
Markus
-----Ursprüngliche Nachricht-----
Von: Jan Bartel [mailto:[email protected]]
Gesendet: Mittwoch, 18. Mai 2011 02:45
An: [email protected]
Cc: Cramer, Markus
Betreff: Re: [jetty-user] Configuration Problem with vhosts
Hi Markus,
What if you tried something like this, using as examples port numbers
8080 and 9090:
* Define 3 Connectors:
"A" listens on ip a.a.a.a and port 9090
"B" listens on ip b.b.b.b and port 8080
"C" listens on ip c.c.c.c and port 8080
* on webappB define the list of connectors to be:
A,B
* on webappC define the list of connectors to be:
A,C
Jan
On 05/18/2011 12:59 AM, Cramer, Markus wrote:
> Hello,
>
> i've some configuration problems with my Jetty 6.1.24.
>
> Imagine i've one dedicated server with the ip address a.a.a.a. And now
> I have 2 more ip addresses (b.b.b.b and c.c.c.c) pointing to the same
> server.
>
> The last two ip addresses are reachable with the two domains www.b.com
> <http://www.b.com/> and www.c.com <http://www.c.com/>. With VHosts in
> Jetty I've configured, that if I call www.b.com <http://www.b.com/> i
> get to Webapp B and if I call www.c.com <http://www.c.com/> i get to
> Webapp C. Both Webapps have different certificates too and it runs
> great J. So far so good.
>
> But what I now want to have is, that both webapps are reachable over
> the ip address a.a.a.a over port GREATPORT because of administrative
> reasons. And on this port there is an own certificate. But because of
> the vhosts, I can not reach the other two webapps with this ip. I just
> thought that I can reach the other two apps with
>
> a.a.a.a:GREATPORT/A
>
> and
>
> a.a.a.a:GREATPORT/B
>
> .
>
> Is something like this possible? For administrative reasons there is
> only one certificate necessaryJ.
>
> Greetings,
>
> Markus
--
Jan Bartel, Webtide LLC | [email protected] | http://www.webtide.com
=====================================================================================
eQ-3 Entwicklung GmbH
Maiburger Str. 36
26789 Leer
Geschäftsführer : Prof. H.-G. Redeker
Registergericht: Amtsgericht Aurich, HRB 110388
Der Inhalt dieser E-Mail ist vertraulich und oder rechtlich geschützt, und damit ausschließlich für den bezeichneten Adressaten bestimmt. Wenn Sie nicht der vorgesehene Adressat dieser E-Mail oder dessen Vertreter sein sollten, so beachten Sie bitte, dass jede Form der Kenntnisnahme, Veröffentlichung, Vervielfältigung oder Weitergabe des Inhalts dieser E-Mail unzulässig ist. Wir bitten Sie, sich in diesem Fall mit dem Absender der E-Mail in Verbindung zu setzen.
The information contained in this e-mail is intended only for the personal and confidential use of the recipient(s) named above. This communication may contain information that is proprietary, privileged or confidential or otherwise legally exempt from disclosure. If the reader of this e-mail is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this document in error and that you are not authorized to read, print, retain, copy or disseminate this message or any part of it. If you have received this message in error, please notify the sender immediately by e-mail.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email