Board index » jbuilder » can Tomcat do virtual hosting without Apache?

can Tomcat do virtual hosting without Apache?


2004-02-17 04:50:46 AM
jbuilder3
I'm trying to get the embedded Tomcat in JBoss-3.2.3 to do virtual hosting,
and everywhere I read about this topic on the web, it talks about Apache
files. Can Tomcat do virtual hosting without Apache? In JBoss can you do
virtual hosting with the default server?
 
 

Re:can Tomcat do virtual hosting without Apache?

These are three Host nodes I have in my server.xml file, can you check to
see if there's anything wrong with them?
<Host name="peter" debug="0" appBase="webapps" autoDeploy="true">
<Context path="" docBase="/PeterHenry" debug="1"/>
</Host>
<Host name="fred" debug="0" appBase="webapps" autoDeploy="true">
<Context path="" docBase="fred" debug="1"/>
</Host>
<Host name="pat" debug="0" appBase="webapps" autoDeploy="true">
<Context path="" docBase="" debug="1"/>
</Host>
I have three war files in the /webapps directory under Tomcat, and when
Tomcat starts up, it expands them out into an exploded version. I have three
entries in my windows/.../lmhost file that maps peter, fred, and pat to
127.0.0.1, but I still have to type out http://pat/Patrick in order to get
this to work and I was hoping to avoid having to put in that last part. Can
anyone help out with this? Please?
 

Re:can Tomcat do virtual hosting without Apache?

Ah man, I think I might have figured this out.
<Host name="peter" debug="0" appBase="deploy" autoDeploy="true"
unpackWARs="false">
<Context path="" docBase="/PeterHenry.war" debug="1"/>
</Host>
<Host name="fred" debug="0" appBase="deploy" autoDeploy="true"
unpackWARs="false">
<Context path="" docBase="/fred.war" debug="1"/>
</Host>
<Host name="pat" debug="0" appBase="deploy" autoDeploy="true"
unpackWARs="false">
<Context path="" docBase="/Pat.war" debug="1"/>
</Host>
But the unpackWARs="false" doesn't seem to be working with Tomcat though.
Any ideas why?
 

{smallsort}

Re:can Tomcat do virtual hosting without Apache?

Quote
<Host name="pat" debug="0" appBase="deploy" autoDeploy="true"
unpackWARs="false">
<Context path="" docBase="/Pat.war" debug="1"/>
</Host>
Damn, this worked on my workstation on Tomcat, but when I tried this on
JBoss-3.2.3, it didn't work. :< Does anyone know how to do this? I'm sure
it's very simple and I'm just missing one small thing.