Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java Open Source > Apache Tomcat
|
Apache Tomcat General discussion of the Apache Tomcat servlet container. For discussions specific to the Professional Apache Tomcat book, please see the book discussion forum for that book.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Apache Tomcat section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 24th, 2009, 12:59 PM
Registered User
 
Join Date: Sep 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Can I Host Multiple Websites Through One Tomcat

Hi

I am new to this ubuntu operating system
i have installed apache-tomcat .
In Apache we can use <virtualhost> in httpd.conf to host
more than one websites . But i am having doubt in tomcat
how to host two multiple websites through tomcat.

can we use <virtualhost> in tomcat ?
 
Old October 5th, 2009, 01:28 AM
Friend of Wrox
 
Join Date: Mar 2007
Posts: 373
Thanks: 0
Thanked 1 Time in 1 Post
Default

As per my knowledge, one simple way of doing it is having multiple <Host> tags in your server.xml. Like as follows
Code:
<Engine defaultHost="www.WEBSITE1.com" name="Catalina">
    <Host name="www.WEBSITE1.com" appBase="/usr/share/tomcat5.5/webapps/WEBSITE1">
        <Context path="" docBase="."/>
    </Host>
    <Host name="www.WEBSITE2.com" appBase="/usr/share/tomcat5.5/webapps/WEBSITE2">
        <Context path="" docBase="."/>
    </Host>
    .....
</Engine>
And for information about virtual hosting go through following links
http://tomcat.apache.org/tomcat-6.0-...ing-howto.html
http://www.ex-parrot.com/pete/tomcat-vhost.html
__________________
- Rakesh
http://iam-rakesh.blogspot.com
 
Old October 18th, 2009, 09:18 AM
Friend of Wrox
 
Join Date: Mar 2007
Posts: 373
Thanks: 0
Thanked 1 Time in 1 Post
Default

I just posted a bit more info at the following URL.

http://iam-rakesh.blogspot.com/2009/...in-tomcat.html
__________________
- Rakesh
http://iam-rakesh.blogspot.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
Tomcat +SEVERE: Remote Host /127.0.0.1 SocketExcep ItsNeverLateToStartAgain Apache Tomcat 1 September 4th, 2007 06:17 AM
login in multiple websites using asp.net 2.0 asra ASP.NET 1.x and 2.0 Application Design 1 August 6th, 2007 10:18 AM
Multiple Realms in Tomcat osama1234 Apache Tomcat 0 March 6th, 2006 07:45 PM
Multiple Host Ping Programm Code HELP! cabanaworld C++ Programming 2 April 28th, 2005 09:55 AM
Apache, tomcat contexts, host, etc. techrolla Apache Tomcat 1 April 10th, 2004 06:06 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.