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 June 19th, 2008, 01:00 AM
Authorized User
Join Date: Jun 2008
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default what do we mean by virtual hosts ?

i am trying my hands on tomcat6 and while reading the book i came across the concept of "virtual hosts" ... can someone help me understand this term in more detail ?? thanks .
Old June 20th, 2008, 01:07 PM
Authorized User
Join Date: Apr 2005
Posts: 71
Thanks: 0
Thanked 0 Times in 0 Posts

May be this will help:


Lets say you have a webserver running. To access it, you use http://hostname:port/

In case you wish the server to be accessed using 2 different hostnames.. then we need to add another DNS name for the new host name Eg: secondhostname

With this change, you will be able to access the app running on web server using the new hostname http://secondhostname:port/

The real problem is when you want a different app to be running when you access the webserver with different host names

http://hostname/ should display app1
http://secondhostname/ should display app2

With traditional approach, this will not work. For this most of the webservers provide options to add virtualhosts and specify what needs to be run on each virtualhost.

Hope that helps

Old June 22nd, 2008, 02:52 AM
Authorized User
Join Date: Jun 2008
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts

thanks !!
i got the point.

Similar Threads
Thread Thread Starter Forum Replies Last Post
monitoring remote hosts on JMeter guyabsconding BOOK: Expert One-on-One J2EE Design and Development 1 January 4th, 2015 04:56 AM
Exceptions in Custom Hosts HectorVictorious BOOK: Professional Windows PowerShell Programming ISBN: 978-0-470-17393-0 0 November 20th, 2008 01:45 PM
mod_jk Load Balancing and Virtual Hosts dfwjava BOOK: Professional Apache Tomcat 0 October 17th, 2007 06:12 PM
can the hosts look at our source code? jini BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 9 February 6th, 2007 10:09 PM
Apache + Tomcat on different hosts? enigmasoldier BOOK: Professional Apache Tomcat 1 October 3rd, 2005 10:40 AM

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