Good news,

 

I solved this problem by completely removing the VirtualHost from the
ims-login.com web app.

This appears to have to have the effect that all requests that aren't
matched by any other web app go to this one.

 

My question is now, is this the expected behaviour? Or will there be issues
later on?

 

From: [email protected]
[mailto:[email protected]] On Behalf Of Joakim Erdfelt
Sent: June-07-13 12:05 PM
To: JETTY user mailing list
Subject: Re: [jetty-users] Jetty 9: Named Connectors and Virtual Hosts

 

What do you mean when you say ... 

 

"However, I am getting a HTTP 404 when I try to go to a random domain linked
to the IMSConnector"?

 

Can you detail what you are doing, and what you are expecting?




--

Joakim Erdfelt <[email protected]>

webtide.com <http://www.webtide.com/> 

Developer advice, services and support
from the Jetty & CometD experts

eclipse.org/jetty <http://eclipse.org/jetty/>  - cometd.org
<http://cometd.org/> 

 

On Fri, Jun 7, 2013 at 8:38 AM, Shane Curless <[email protected]> wrote:

Hello,

I am trying to set up a special configuration in Jetty whereby all requests
on a specific IP address go to a specific WebApp.

What I have done so far, is set up an extra HTTP connector named
"IMSConnector", to do this I have added the following test to
etc/jetty-http.xml:

<Call name="addConnector">
    <Arg>
      <New class="org.eclipse.jetty.server.ServerConnector">
        <Arg name="server"><Ref refid="Server" /></Arg>
        <Arg name="factories">
          <Array type="org.eclipse.jetty.server.ConnectionFactory">
            <Item>
              <New class="org.eclipse.jetty.server.HttpConnectionFactory">
                <Arg name="config"><Ref refid="httpConfig" /></Arg>
              </New>
            </Item>
          </Array>
        </Arg>
        <Set name="name">IMSConnector</Set>
        <Set name="host">127.0.0.2</Set>
        <Set name="port">8082</Set>
        <Set name="idleTimeout"><Property name="http.timeout"
default="30000"/></Set>
      </New>
    </Arg>
  </Call>

This appears to be working, as the log files show references to
"IMSConnector@...{127.0.0.2:8082}" and I can connect on that IP/Port both
via Telnet, and Nginx as a reverse-proxy.

I have the following in an XML file under webapps directory:

<Set name="virtualHosts">
    <Array type="String">
      <Item>@IMSConnector</Item>
      <Item>ims-login.com</Item>
      <Item>*.ims-login.com</Item>
    </Array>
  </Set>

According to the documentation, I should be able to use @IMSConnector to
answer all requests on that connector.
If I go to ims-login.com or anything.ims-login.com, it works exactly as it
should. However, I am getting a HTTP 404 when I try to go to a random domain
linked to the IMSConnector.

I use Nginx as a reverse-proxy, so requests on the external IP are proxied
to 127.0.0.2:8082 on the server.

I am certain this is nothing to do with Nginx, as connecting directly to
127.0.0.2:8082 via telnet and issuing a GET request has exactly the same
result.

Can anyone point out where I may be going wrong?

_______________________________________________
jetty-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/jetty-users

 

_______________________________________________
jetty-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/jetty-users

Reply via email to