You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Simon Stewart <sm...@lateral.net> on 2002/07/31 12:43:07 UTC

jk2 and virtual hosts

I've installed Apache 2.0.39, Tomcat 4.0.4 and jk2 from cvs and I'm
seeing some strange behaviour.

My Apache setup has numerous virtual hosts, most of which don't
require Tomcat at all, though the default host does. Tomcat is
configured with several Hosts and Aliases in server.xml, and is only
listening on port 8080. Only the locations in the apache virtual hosts
that require tomcat have got the servlet handler added:

    <Location "/content/*" >
        SetHandler jakarta-servlet2
        JkUriSet group lb
        JkUriSet servlet content
        JkUriSet host www.foo.net
    </Location>

When I try to access some content on an apache virtual host that
_doesn't_ use Tomcat, and _doesn't_ have the jakarta-servlet2 handler
added, I still get a 500 error from Tomcat.

To clarify a bit more. Imagine that the snippet above is for
"virtualhost1". "virtualhost2" is a PHP powered site, that doesn't
contain a subdirectory called "content" but is running in the same
instance of apache 2. I would expect the following:

GET http://virtualhost1/content/ --- returns the page from Tomcat
GET http://virtualhost2/content/ --- returns a 404 error

However, the second GET returns a 500 error from Tomcat, where it
looks like the server has mistakenly tried to execute virtualhost1's
index page. Can someone please help me shed some light on this?

Cheers,

Simon

-- 
'I went to a restaurant that serves "breakfast at any time". So I
ordered French Toast during the Renaissance.' --- Steven Wright

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>