Jonathan Mast wrote:
I'm using Apache+Tomcat (1.3.33, 5.5.17) and I have servlet named "bar",
with no file extension in its name.

bar is in a folder named "foo" which is reachable by 2 virtual hosts:
www.mysite.com/foo/bar
foo.mysite.com/bar

I know to how tell apache that request for  /bar on the WWW virtual host
should be handled by Tomcat:
JkMount        /foo/*    ajp13

Simple enough, but can I also specify foo.mysite.com as well, like this?
JkMount       foo.mysite.com/* ajp13

(Note that above, you are not just re-directing "bar" to Tomcat, you are redirecting much more)


I'm guessing a number of things here, but you seem to talk about VirtualHosts in Apache, apparently something like this :

<VirtualHost *:80>
  ServerName www.mysite.com
  ...
</VirtualHost>

<VirtualHost *:80>
  ServerName foo.mysite.com
  ...
</VirtualHost>

So why not then

<VirtualHost *:80>
  ServerName www.mysite.com
  JkMount /foo/bar ajp13
  JkMount /foo/bar* ajp13
</VirtualHost>

<VirtualHost *:80>
  ServerName foo.mysite.com
  JkMount /bar ajp13
  JkMount /bar* ajp13
</VirtualHost>

If it makes it easier, and at least in Apache 2.x, you can also use sections like

<Location /foo/bar>
  SetHandler jakarta-servlet
  ...
</Location>

as a kind of alias for your JkMount directives.
This is a bit harder to find in the documentation, but it appears here :
http://tomcat.apache.org/connectors-doc/reference/apache.html
Using SetHandler and Environment Variables
(at the very end)


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to