Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8454251
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T11:58:34+00:00 2026-06-10T11:58:34+00:00

For Example: I am having one primary temp domain www.product.com For each client i

  • 0

For Example:

I am having one primary temp domain

www.product.com

For each client i need to have separate sub domain mapped to same server with same port(80) but with different instance name (different .wars files)

www.client1.product.com
www.client2.product.com
www.clientn.product.com

(correct me if i am wrong) As i know if i start jetty instance , each will start at seperate port no’s

client1 war will start at port 3001
client2 war  will start at port 3002
client3 war will start at port 3003

What my question is how do i map all the instances with port 80 with appropriate identical sub domains

if i access

www.client4.product.com , i need to get jetty app running in port 3004

Update:

for more understanding of my architecture , if client2 jetty instance running on port 3002 went to down state due to runtime exception or memory leakage or manual restart , all other jetty instances running independently (similar to architecture behind google appengine uses jetty)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T11:58:36+00:00Added an answer on June 10, 2026 at 11:58 am

    To do this, don’t run multiple Jetty instances. Run one instance with multiple VirtualHosts. To do this, you can configure jetty like this:

      <Configure class="org.eclipse.jetty.webapp.WebAppContext">
        <Set name="war"><SystemProperty name="jetty.home"/>/webapps/client1.war</Set>
        <Set name="contextPath">/</Set>
        <Set name="virtualHosts">
          <Array type="java.lang.String">
            <Item>www.client1.product.com</Item>      
          </Array>
        </Set>
    </Configure>
    <Configure class="org.eclipse.jetty.webapp.WebAppContext">
      <Set name="war"><SystemProperty name="jetty.home"/>/webapps/client2.war</Set>
      <Set name="contextPath">/</Set>
      <Set name="virtualHosts">
        <Array type="java.lang.String">
          <Item>www.client2.product.com</Item>      
        </Array>
      </Set>
    </Configure>
    

    Check this page out for more information on how to configure this.

    Alternatively, if you really want to have multiple Jetty instances, you can front it with another server like Apache that acts as a reverse proxy. Apache can then be set up with virtual hosts by editing your httpd.conf:

    <VirtualHost *:80>
         ServerName www.client1.product.com
         ProxyRequests off
         ProxyPass / http://someInternalHost:3001/
         ProxyPassReverse / http://someInternalHost:3001/
    </VirtualHost>
    
    <VirtualHost *:80>
         ServerName www.client2.product.com
         ProxyRequests off
         ProxyPass / http://someInternalHost:3001/
         ProxyPassReverse / http://someInternalHost:3001/
    </VirtualHost>
    

    You can see the apache docs for more info.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For Example: I am having one primary temp domain www.product.com For each client i
Is there anything wrong with having one view reference another view? For example, say
I'd like to version a grails domain class by DateTime such that: each primary
I'm having some difficulty with this example: <img src=image1/<?php echo $file; ?>.jpg style=width:500px />
I having trouble in my sql query .Please see my example As u see,
I'm currently having trouble getting example code for using tweepy to access Twitter's Streaming
I am having problems getting the TextWrapping to work in this example. Can anyone
I am having difficulties in assigning double value (for example 124.00) of label text
Im having a problem with a multimodule project in maven/jenkins. For example my structure
Im having problems with displaying ONLY some elements ONLY on print page. For example

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.