Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
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 <joakim@xxxxxxxxxxx>
Developer advice, services and support
from the Jetty & CometD experts


On Fri, Jun 7, 2013 at 8:38 AM, Shane Curless <shane@xxxxxxxxxxxxx> 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
jetty-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-users


Back to the top