Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] Jetty8, Virtual Hosts and aliasing.

Hi,

I have a server JAR that is deployed once per customer, it is the API
server for their software package, using embedded Jetty8 to serve REST
pages with Jersey.

To that end, each instance is deployed on a different domain name, but
the port for each API instance must be the same, so that anything
programmed against it can always find it.

The problem I'm having is that, even when using a
SelectChannelConnector and setting the host property, I can't get two
instances to run simultaneously, I get a BindException with "Address
already in use".

I've seen solutions using Apache to proxy requests to different Jetty
instances, where the Jetty servers run on different internal ports and
Apache shuttles the requests around, but, ideally, I'd like to avoid
this if possible. We're already using Apache to server the sites that
use this API, and the less configuration that needs to go into that
the better.

I fear there may be no easy answer to this, so the next step would be
to create a Jetty-based proxy, that marshals all requests to a given
port, and redirects them based on their domain name but, if I can
avoid another server component, that would be preferable.

Thanks in advance for any help.

Martin


Back to the top