1) what's the equivalent configuration in Jetty to listen on multiple IPs, as the Listen directive in Apache?
2) How can a sub-domain be configured with different context path?
Question 1.
Assuming you're configuring using a jetty.xml file, then you'll have something in there that looks a bit like this:
<Call name="addConnector">
<Arg>
<New class="org.eclipse.jetty.server.nio.SelectChannelConnector">
<Set name="host"><Property name="jetty.host" /></Set>
<Set name="port"><Property name="jetty.port" default="8080"/></Set>
<Set name="maxIdleTime">300000</Set>
<Set name="Acceptors">2</Set>
<Set name="statsOn">false</Set>
<Set name="confidentialPort">8443</Set>
<Set name="lowResourcesConnections">20000</Set>
<Set name="lowResourcesMaxIdleTime">5000</Set>
</New>
</Arg>
</Call>
You'll need one connector for each IP you want to listen on. So, just duplicate that section as many times as you need. Then for each of them replace the line
<Set name="host"><Property name="jetty.host" /></Set>
with
<Set name="host">www.xxx.yyy.zzz</Set>
where www.xxx.yyy.zzz is the IP you want to listen on.
Question 2.
See
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With