You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by chenll <c_...@hotmail.com> on 2010/03/03 18:01:14 UTC
Tomcat+apache on name_based virtual hosts
Hi, I have a server which has only one IP and runs on Windows XP. And I have two domain names: a.university.com and b.university.com. I have built two websites for both of them on the Apache 2.
Now I installed another web application which runs on Tomcat 6, and want to load the web application when I enter http://b.university.com/webap in IE. What should I do? Thank you in advanced!
_________________________________________________________________
想知道明天天气如何?必应告诉你!
http://cn.bing.com/search?q=%E5%A4%A9%E6%B0%94%E9%A2%84%E6%8A%A5&form=MICHJ2
Re: Tomcat+apache on name_based virtual hosts
Posted by Pid <pi...@pidster.com>.
On 04/03/2010 04:01, chenll wrote:
>
> Note: both a.university.com and b.university.com are built on Apache instead of Tomcat, so they are not in the directory of webapps. just "a.university.com/webap" is pointed to the web application which is built on Tomcat.
Please start a new thread.
p
>> From: Chuck.Caldarale@unisys.com
>> To: users@tomcat.apache.org
>> Date: Wed, 3 Mar 2010 12:17:47 -0600
>> Subject: RE: Tomcat+apache on name_based virtual hosts
>>
>>> From: Jordan Michaels [mailto:jordan@viviotech.net]
>>> Subject: Re: Tomcat+apache on name_based virtual hosts
>>>
>>> You can do this by creating new<Host> and<Context> entries in the
>>> server.xml file for each site.
>>
>> Please don't suggest putting<Context> elements in server.xml; that's ancient, dismal practice. Place the<Context> elements in conf/Catalina/[host]/ROOT.xml, with a docBase attribute pointing to the location of the .war file or directory.
>>
>>> <Host name="a.university.com" appBase="webapps"
>>> unpackWARs="true" autoDeploy="true"
>>> xmlValidation="false" xmlNamespaceAware="false">
>>> <Context path="" docBase="[PATH TO WEBAPP]" />
>>> </Host>
>>> <Host name="b.university.com" appBase="webapps"
>>> unpackWARs="true" autoDeploy="true"
>>> xmlValidation="false" xmlNamespaceAware="false">
>>> <Context path="" docBase="[PATH TO WEBAPP]" />
>>> </Host>
>>
>> Having the same appBase for multiple<Host> elements is asking for trouble, since the two hosts will scribble on top of each other.
>>
>> - Chuck
>>
>>
>> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>
> _________________________________________________________________
> MSN十年回馈,每位用户可免费获得价值25元的卡巴斯基反病毒软件2010激活码,快来领取!
> http://kaba.msn.com.cn/?k=1
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Tomcat+apache on name_based virtual hosts
Posted by chenll <c_...@hotmail.com>.
Note: both a.university.com and b.university.com are built on Apache instead of Tomcat, so they are not in the directory of webapps. just "a.university.com/webap" is pointed to the web application which is built on Tomcat.
> From: Chuck.Caldarale@unisys.com
> To: users@tomcat.apache.org
> Date: Wed, 3 Mar 2010 12:17:47 -0600
> Subject: RE: Tomcat+apache on name_based virtual hosts
>
> > From: Jordan Michaels [mailto:jordan@viviotech.net]
> > Subject: Re: Tomcat+apache on name_based virtual hosts
> >
> > You can do this by creating new <Host> and <Context> entries in the
> > server.xml file for each site.
>
> Please don't suggest putting <Context> elements in server.xml; that's ancient, dismal practice. Place the <Context> elements in conf/Catalina/[host]/ROOT.xml, with a docBase attribute pointing to the location of the .war file or directory.
>
> > <Host name="a.university.com" appBase="webapps"
> > unpackWARs="true" autoDeploy="true"
> > xmlValidation="false" xmlNamespaceAware="false">
> > <Context path="" docBase="[PATH TO WEBAPP]" />
> > </Host>
> > <Host name="b.university.com" appBase="webapps"
> > unpackWARs="true" autoDeploy="true"
> > xmlValidation="false" xmlNamespaceAware="false">
> > <Context path="" docBase="[PATH TO WEBAPP]" />
> > </Host>
>
> Having the same appBase for multiple <Host> elements is asking for trouble, since the two hosts will scribble on top of each other.
>
> - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
_________________________________________________________________
MSN十年回馈,每位用户可免费获得价值25元的卡巴斯基反病毒软件2010激活码,快来领取!
http://kaba.msn.com.cn/?k=1
RE: Tomcat+apache on name_based virtual hosts
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Jordan Michaels [mailto:jordan@viviotech.net]
> Subject: Re: Tomcat+apache on name_based virtual hosts
>
> You can do this by creating new <Host> and <Context> entries in the
> server.xml file for each site.
Please don't suggest putting <Context> elements in server.xml; that's ancient, dismal practice. Place the <Context> elements in conf/Catalina/[host]/ROOT.xml, with a docBase attribute pointing to the location of the .war file or directory.
> <Host name="a.university.com" appBase="webapps"
> unpackWARs="true" autoDeploy="true"
> xmlValidation="false" xmlNamespaceAware="false">
> <Context path="" docBase="[PATH TO WEBAPP]" />
> </Host>
> <Host name="b.university.com" appBase="webapps"
> unpackWARs="true" autoDeploy="true"
> xmlValidation="false" xmlNamespaceAware="false">
> <Context path="" docBase="[PATH TO WEBAPP]" />
> </Host>
Having the same appBase for multiple <Host> elements is asking for trouble, since the two hosts will scribble on top of each other.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat+apache on name_based virtual hosts
Posted by Jordan Michaels <jo...@viviotech.net>.
You can do this by creating new <Host> and <Context> entries in the
server.xml file for each site.
For example:
<Host name="a.university.com" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Context path="" docBase="[PATH TO WEBAPP]" />
</Host>
and
<Host name="b.university.com" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Context path="" docBase="[PATH TO WEBAPP]" />
</Host>
Hope this helps!
Warm regards,
Jordan Michaels
Vivio Technologies
http://www.viviotech.net/
Open BlueDragon Steering Committee
Railo Community Distributions
chenll wrote:
> Hi, I have a server which has only one IP and runs on Windows XP. And I have two domain names: a.university.com and b.university.com. I have built two websites for both of them on the Apache 2.
> Now I installed another web application which runs on Tomcat 6, and want to load the web application when I enter http://b.university.com/webap in IE. What should I do? Thank you in advanced!
>
>
>
> _________________________________________________________________
> 想知道明天天气如何?必应告诉你!
> http://cn.bing.com/search?q=%E5%A4%A9%E6%B0%94%E9%A2%84%E6%8A%A5&form=MICHJ2
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat+apache on name_based virtual hosts
Posted by Pid <pi...@pidster.com>.
On 03/03/2010 17:01, chenll wrote:
>
> Hi, I have a server which has only one IP and runs on Windows XP. And I have two domain names: a.university.com and b.university.com. I have built two websites for both of them on the Apache 2.
> Now I installed another web application which runs on Tomcat 6, and want to load the web application when I enter http://b.university.com/webap in IE. What should I do? Thank you in advanced!
>
>
>
> _________________________________________________________________
> 想知道明天天气如何?必应告诉你!
> http://cn.bing.com/search?q=%E5%A4%A9%E6%B0%94%E9%A2%84%E6%8A%A5&form=MICHJ2
Please don't hijack an existing thread.
Start a new message, this means a completely new message addressed to
the list, simply editing the subject line & body leaves headers in place
that put your message in the middle of another (in this case, long) thread.
p
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org