Re: AW: [jetty-user] Configuration Problem with vhosts

Jan Bartel <[email protected]> Wed, 18 May 2011 16:28:32 +1000
Newsgroups gmane.comp.java.jetty.support
Organization Webtide
Message-ID <[email protected]>
Markus,


I don't see any host names specified on the connectors, just ports.

Jan

On 05/18/2011 04:20 PM, Cramer, Markus wrote:
> 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

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email