1

Multiple domains and subdomains are pointing to my server. I want to serve only one or two of them with jetty over 8080 the rest should be ignored by jetty.

Is there a way to do this? (OK, I am sure there is one but I could not figure out how) I am using Jetty 8 on Ubuntu 12.04

thx in advance

Mike Mitterer
  • 6,810
  • 4
  • 41
  • 62

1 Answers1

1

What you want to work with is Virtual Hosts. http://wiki.eclipse.org/Jetty/Howto/Configure_Virtual_Hosts

However, note that this applies to the webapp you deploy, not all of jetty. This is because Jetty will bind/listen to port 8080 on the interfaces (IP addresses) you specify, and has to accept the connection, accept the HTTP request, and then make its determination on what hostname / domain the browser is asking for.

Joakim Erdfelt
  • 46,896
  • 7
  • 86
  • 136
  • That's what I already did. It works fine for the two subdomains where I need 8080 (jetty) but it brings the jetty 404 error-page for all the other domains including the "available context"-info. – Mike Mitterer Aug 30 '12 at 10:31
  • Found a solution on: http://docs.codehaus.org/display/JETTY/How+to+Create+Custom+Error+Pages "One of the quickest ways to avoid this behavior is to create a catch all context. Create a **"root" web app** mapped to the "/" url. Have the **index.html redirect to whatever** place with a header directive." – Mike Mitterer Aug 30 '12 at 10:35