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 May 14th, 2004, 03:39 AM
rvw rvw is offline
Registered User
 
Join Date: Oct 2003
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Server.xml: how to set up a virtual host

I need to be able to set up virtual hosts. We have one IP-address, but have several domain-names that are served from the same Tomcat server. In the book in chapter 19 there is an example how to configure this. I can set the appbase to another directory and that works. Tomcat is installed in another directory than /Library/Tomcat. Here's the code for the server.xml file:

Code:
 <Engine name="Standalone" defaultHost="localhost" 
    appBase="/Library/Tomcat/webapps"
    debug="0">

    <Host name="europa.dom" debug="0" 
        appbase="/volumes/websites/europa.dom/webapps" unpackWARs="true">
        <Context path="" docBase="ROOT" debug="0" />
    </Host>
</Engine>
Opening localhost pages works fine, but opening europa.dom-pages doesn't work. Do I need to set something else to get this to work? Am I doing something wrong here?

Btw: I'm working on a Mac OSX 10.3.3, Tomcat 5.0.24, but need to do the same on W2K, Tomcat 4.1.24. On both machines Apache is not running.

 
Old August 10th, 2004, 01:38 PM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 204
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Im guessing, but you could try using the ip instead of the domain name, I know you should be able to use the domain, just an idea

 
Old August 10th, 2004, 11:34 PM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 345
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to gokul_blr Send a message via Yahoo to gokul_blr
Default

You need to look into the Server.xml file for the host & port settings.

Could you see some setup, I am not much familiar with Mac OS
<Server port="8005" shutdown="SHUTDOWN" debug="0">
  <Service name="Tomcat-Standalone">

The link will help u much to setup the TOMCAT

http://www.coreservlets.com/Apache-T...figured-Tomcat









Similar Threads
Thread Thread Starter Forum Replies Last Post
virtual host problem cjp17 BOOK: Professional Search Engine Optimization with PHP: A Dev's Guide to SEO ISBN: 978-0-470-10092-9 1 May 23rd, 2009 05:25 AM
Access sql server from on different host sdagger SQL Server ASP 1 October 29th, 2008 06:14 PM
Send an object from a server-socket to the host? magsto General .NET 0 August 16th, 2005 06:42 AM
Wildcards in Virtual Host angrycat Apache Tomcat 0 December 2nd, 2004 01:33 PM
strange behaviour: session variable/virtual host ahfaich Pro PHP 8 May 12th, 2004 11:53 AM





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