You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jason Pell <Ja...@dssonline.com.au> on 2000/12/08 06:36:02 UTC

Virtual Hosting - Port based with Tomcat 3.2

What I want is any requests to
http://mars.its.deakin.edu.au:8000/servlet/testform
to be handled by the webapps/connect/WEB-INF/classes/testform servlet.

This is so I can define some aliases that are applicable only to the
8000 port.

I cannot get it to work as expected, what am I doing wrong?

Thanks
Jason

--------------- This is my server.xml fragment to define a host, do I
need to specify a port as well?
<Host name="mars.its.deakin.edu.au">
    <Context path=""
        docBase="webapps/connect"
        crossContext="false"
        debug="7"
        reloadable="true">
</Context>
</Host>

---------------- This is a fragment from mod_jk.conf that I have tried
to use.
Listen 8000
<VirtualHost mars.its.deakin.edu.au:8000>
 DocumentRoot /opt/tomcat/webapps/connect

 <Directory "/opt/tomcat/webapps/connect">
      Options Indexes FollowSymLinks
 </Directory>
 Alias /admin /opt/tomcat/webapps/connect/admin

JkMount /servlet/* ajp13
JkMount /*.jsp ajp13

<Location /WEB-INF/ >
    AllowOverride None
     deny from all
 </Location>
</VirtualHost>
---------------------------------------------------------------------------------------

--
Jason Pell
Senior Analyst/Programmer
Deakin Software Services Pty Ltd
12 Gheringhap St, Geelong Victoria 3220 Australia
Phone: 03 5227 8858 International: +61 3 5227 8858
Fax: 03 5227 8907 International: +61 3 5227 8907
E-mail Jason.Pell@dssonline.com.au
http://www.dssonline.com.au
Customer Support Hotline: 1800 620 497

"Callista - the brightest solution in university management"

---------------------------------------------------------------
Important Notice: The contents of this email transmission,
including attachments, may be privileged and confidential.
Any unauthorised use of the contents is expressly prohibited.
If you have received this transmission in error, please advise
the sender by return email or telephone immediately and
destroy all versions.
---------------------------------------------------------------



Re: Virtual Hosting - Port based with Tomcat 3.2

Posted by Jan Labanowski <jk...@osc.edu>.
I may be missing something, but either you do virtual hosts 
in Apache (i.e., in the httpd.conf) and tomcat talks to apache
via ajp1x and does not know about hosts or anything - it is just a worker
who talks to apache and serves whatever apache tells him to serve.

or

tomcat is standalone, and does not talk to apache via ajp1x, but is itself
a Web server, and talks HTML to outside world. Then it can do virtual hosts.

In short you have to decide who does virtual hosts, apache or tomcat.
Probably you could make tomcat talk to apache and do virtual hosts by
itself (then apache would not know about tomcat odd jobs on the side)
but why? 

If you went through all this effort to make tomcat talk to apache via mod_jk,
then let Apache do the virtual hosts, and make tomcat what it does best,
serve JSP and servlets...

Jan
jkl@osc.edu



On Fri, 8 Dec 2000, Jason Pell wrote:

> What I want is any requests to
> http://mars.its.deakin.edu.au:8000/servlet/testform
> to be handled by the webapps/connect/WEB-INF/classes/testform servlet.
> 
> This is so I can define some aliases that are applicable only to the
> 8000 port.
> 
> I cannot get it to work as expected, what am I doing wrong?
> 
> Thanks
> Jason
> 
> --------------- This is my server.xml fragment to define a host, do I
> need to specify a port as well?
> <Host name="mars.its.deakin.edu.au">
>     <Context path=""
>         docBase="webapps/connect"
>         crossContext="false"
>         debug="7"
>         reloadable="true">
> </Context>
> </Host>
> 
> ---------------- This is a fragment from mod_jk.conf that I have tried
> to use.
> Listen 8000
> <VirtualHost mars.its.deakin.edu.au:8000>
>  DocumentRoot /opt/tomcat/webapps/connect
> 
>  <Directory "/opt/tomcat/webapps/connect">
>       Options Indexes FollowSymLinks
>  </Directory>
>  Alias /admin /opt/tomcat/webapps/connect/admin
> 
> JkMount /servlet/* ajp13
> JkMount /*.jsp ajp13
> 
> <Location /WEB-INF/ >
>     AllowOverride None
>      deny from all
>  </Location>
> </VirtualHost>
> ---------------------------------------------------------------------------------------
> 
> --
> Jason Pell
> Senior Analyst/Programmer
> Deakin Software Services Pty Ltd
> 12 Gheringhap St, Geelong Victoria 3220 Australia
> Phone: 03 5227 8858 International: +61 3 5227 8858
> Fax: 03 5227 8907 International: +61 3 5227 8907
> E-mail Jason.Pell@dssonline.com.au
> http://www.dssonline.com.au
> Customer Support Hotline: 1800 620 497
> 
> "Callista - the brightest solution in university management"
> 
> ---------------------------------------------------------------
> Important Notice: The contents of this email transmission,
> including attachments, may be privileged and confidential.
> Any unauthorised use of the contents is expressly prohibited.
> If you have received this transmission in error, please advise
> the sender by return email or telephone immediately and
> destroy all versions.
> ---------------------------------------------------------------
> 
>