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 7551149
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T10:24:19+00:00 2026-05-30T10:24:19+00:00

How can I configure Tomcat (in standalone mode, that is without Apache [*]) so

  • 0

How can I configure Tomcat (in standalone mode, that is without Apache [*]) so that I can deploy it on one server and have it serve two different webapps, depending on the domain name requested?

What are the gotchas when doing that? Can you have SSL on both domains? If anyone here actually did it I’d be interested in answer to these questions as well as as much feedback as possible…

I found a blog entry describing such a setup, but it’s for Tomcat 5.5:

<Engine defaultHost="domain1.com" name="Catalina">
    <Host name="domain1.com" appBase="/home/user1/domain1">
     <Alias>www.domain1.com</Alias>
     <Context path="" docBase="."/>
    </Host>
    <Host name="domain2.com" appBase="/home/user1/domain2">
     <Alias>www.domain2.com</Alias>
     <Context path="" docBase="."/>
    </Host>

http://iam-rakesh.blogspot.com/2009/10/hosting-multiple-domains-in-tomcat.html

Also, as of now I’ve got one webapp, ROOT.war, inside …/tomcat/webapps/

How would that work once I’d have two “roots”, one root webapp for domain1.com and one root webapp for domain2.com? Where would the .war needs to be located?

  • 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-05-30T10:24:21+00:00Added an answer on May 30, 2026 at 10:24 am

    The blog that you linked to basically shows how to do it. The one thing that you need to differently is to set the ‘docBase’ attribute differently for each host. The docBase is the location of war files for that host. With different docBases, you can have different root apps.

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

Sidebar

Related Questions

I have installed apache-tomcat-6.0.35-windows-x86 in my system. How can I configure it and set
What is the smartest way to configure Tomcat to have two localhost instances? Please
I downloaded apache-tomcat-7.0.20.tar.gz from here => http://tomcat.apache.org/download-70.cgi Now how can i install/configure it manually
I'm using Tomcat 6.0, and I want to know how can I configure Tomcat's
I have configured Tomcat to use LDAP / AD. How can I get more
Is there a way that I can configure Visual Studio 2008 to understand CamelCase?
I'm running Tomcat in standalone mode. The standalone part is very important: I am
In Tomcat, we can configure the Web app to treat non JSP files as
I'm trying to configure org.apache.commons.dbcp.BasicDataSource as bean in web.xml under a tomcat project using
How can I configure tomcat to handle .rhtml pages with jruby? I guess I

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.