Group: comp.lang.java.programmer
From: wheresjim
Date: Monday, February 25, 2008 6:33 PM
Subject: Re: IP Based Virtual Hosting / Tomcat

That's great! I am not using this for SSL, but rather I want a second
webapp folder for staging and want to use the same named URL but with
different IP adresses and choose which webapps folder to use based on
IP, regardless of name.

So just as you said, I added useIPVHosts="true" to my connector such
that:

maxThreads="150" minSpareThreads="25"
maxSpareThreads="75"
redirectPort="443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true"
useIPVHosts="true"/>

Then I added set the virtual hosts such that:

unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false"> ...


unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false"> ...


Then I made the following additions to my hosts file:

192.168.12.201 staging.mywebserver.com
[my outside ipaddress] deploy.mywebserver.com

Now whenever I test, I just set my client's hosts file to:

192.168.12.201 deploy.mywebserver.com

And I can test without disrupting my deployment server.

Thanks!

Jim



News in English | Binaries Groups | 20lbs in 30 days