[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Mapping different domains to different webapps in TOMCAT

Posted on 2006-04-10
2
Medium Priority
?
370 Views
Last Modified: 2010-08-05
How do you setup a single tomcat instance so that, for example, www.domainname1.com goes to webapp A, and www.domainname2.com goes to webapp B ?

Thanks in advance.
0
Comment
Question by:Captain-Fantastic
1 Comment
 
LVL 10

Accepted Solution

by:
sleep_furiously earned 1050 total points
ID: 16442102
Use multiple Host elements with the Engine element in server.xml

Note:  One of the Hosts listed must match the defaultHost


For example:

    <Engine name="Standalone" defaultHost="localhost" debug="0">
 
      <Host name="localhost" debug="0" appBase="webapps"
            unpackWARs="true" autoDeploy="true">
        <Context path="" docBase="ROOT" debug="0"/>
      </Host>

      <Host name="www.domainname1.com" appBase="/home/app1/webapp">
        <Context path="" docBase="."/>
      </Host>


      <Host name="www.domainname2.com" appBase="/home/app2/webapp">
        <Context path="" docBase="."/>
      </Host>


    </Engine>
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses
Course of the Month17 days, 22 hours left to enroll

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question