Learning by teaching, here...
On Thu, Feb 13, 2003 at 01:10:03PM -0500, Xiongfei Wang wrote:
> I guess I need separate server.xml for each virtual host. Can anybody
> give some suggestions or point to some website i can set up
> multiple server.xml for each virtual host?
No, you don't need a separate server.xml for each virtual
host. You can structure your server.xml like so (carved out
of my Apache 1.3 / mod_jk / Tomcat 4.0 setup):
<Server port="8005">
<Service name="Tomcat-Standalone">
<Engine name="Standalone">
<Host name="myvirtualhost1">
<Context path="" docBase="/pathto/host1" >
</Context>
</Host>
<Host name="myvirtualhost">
<Context path="" docBase="/pathto/host" >
</Context>
</Host>
</Engine>
</Service>
</Server>
Then in apache's httpd.conf you have some:
<VirtualHost myvirtualhost1>
DocumentRoot /pathto/host1
JkMount /*.jsp ajp13
</VirtualHost>
<VirtualHost myvirtualhost>
DocumentRoot /pathto/host
JkMount /*.jsp ajp13
</VirtualHost>
Now myvirtualhost1/index.jsp is different than
myvirtualhost/index.jsp.
You can also have additional apps
<Context path="/app1" docBase="/pathto/localapps/app1" >
</Context>
and then:
Alias /app1 "/pathto/localapps/app1"
JkMount /app1/*.jsp ajp13
However, if you make /pathto/localapps your appBase, Tomcat
will automatically configure all the apps under there for
each <Host/> with that appBase. (So don't do that.)
> On Thu, 13 Feb 2003, Xiongfei Wang wrote:
>
> > I have install apache-tomcat in my redhat7.3 server. thanks for all
> > howtos (John's and others)
> >
> > I have a new problem. I have apache virtual host in my server. Now.
> > if i do http://myvirtualhost1/examples, and http://myvirtualhost/examples
> > the point to the servelet jsp example page. Is there a way i can set up
> > apache-tomcat vitual host? In this i can keep some info not shareed by two
> > vitualhost?
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]