p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > Java > Java Open Source > Apache Tomcat
I forgot my password Register Now
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 24th, 2009, 01:59 PM
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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 ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old October 5th, 2009, 02:28 AM
Friend of Wrox
Points: 1,108, Level: 13
Points: 1,108, Level: 13 Points: 1,108, Level: 13 Points: 1,108, Level: 13
Activity: 2%
Activity: 2% Activity: 2% Activity: 2%
 
Join Date: Mar 2007
Location: Hyderabad, A.P., India.
Posts: 363
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #3 (permalink)  
Old October 18th, 2009, 10:18 AM
Friend of Wrox
Points: 1,108, Level: 13
Points: 1,108, Level: 13 Points: 1,108, Level: 13 Points: 1,108, Level: 13
Activity: 2%
Activity: 2% Activity: 2% Activity: 2%
 
Join Date: Mar 2007
Location: Hyderabad, A.P., India.
Posts: 363
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

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 07: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 11: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 10:55 AM
Apache, tomcat contexts, host, etc. techrolla Apache Tomcat 1 April 10th, 2004 07:06 PM



All times are GMT -4. The time now is 06:45 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc