Solved

how to configure virtual host in tomcat 4.x

Posted on 2006-11-13
2
209 Views
Last Modified: 2010-03-04
Hi Guys

I had tomcat 5.x set up on my computer but for compatibilty issues wth the production server we are de-grading our servers to 4.x

now would you guys please help me in setting up virtual host in version 4.x

In tomcat 5.x  I had the virtual hosting configuration as follows, i tried the same in 4.x but it doesnt work

-----------------------------

<Host name="localhost" appBase="" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
     <Context path ='' docBase= 'C:\svn_chapters\trunk\Tomcat\webapps\chapters' debug='0' />    
</Host>

<Host name="newccim.woody.com" appBase="" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
     <Context path ='' docBase= 'C:\svn_ccim\trunk\Tomcat\webapps\ccim' debug='0' />
</Host>



0
Comment
Question by:huzefaq
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 6

Accepted Solution

by:
bpeterse earned 500 total points
ID: 17942490
We're running on 4.1.3 on Solaris and it appears to contain a bit more:      

<Host className="org.apache.catalina.core.StandardHost" appBase="{your_app_base}" autoDeploy="true" configClass="org.apache.cata
lina.startup.ContextConfig" contextClass="org.apache.catalina.core.StandardContext" debug="0" deployXML="true" errorReportValveClass="org
.apache.catalina.valves.ErrorReportValve" liveDeploy="true" mapperClass="org.apache.catalina.core.StandardHostMapper" name="{your_FQDN}" unpackWARs="true">
        <Valve className="org.apache.catalina.valves.AccessLogValve" debug="0" directory="logs/access" resolveHosts="false" suffix=".txt"
 prefix="{app_name_access.}" pattern="%h %l %u %t &quot;%r&quot; %s %b" fileDateFormat="yyyy-MM-dd" rotatable="true"/>
      <Alias>{your_app_alias}</Alias>
</Host>


The hierarchy of elements is as follows - top to bottom (don't forget your closing elements):

<Server>
 <JNDI> (if needed)
 <Service>
  <Connector>
   <Engine>
    <Listener> global
    <Valve> global
    <Realm> global
    <Logger> global
     <Host> default
      <Context> default
     <Host(s)> defined
      <Valve>
      <Logger>
0
 
LVL 6

Expert Comment

by:bpeterse
ID: 17942503
Perhaps you can access the admin GUI to set it up through that - in 4.x I believe the admin gui was included in the distribution.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question