You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by "Zacharias J. Beckman" <zb...@creativesun.com> on 2000/01/08 02:37:06 UTC

Virtual hosts and Tomcat; how?

I'm using named virtual hosts in Apache. This seems to be causing a problem
with Tomcat.

Assuming I have www.one.com and www.two.com configured as named virtual
hosts, I might want to invoke:
    http://www.one.com/foo.jsp
or
    http://www.two.com/bar.jsp

Unfortunately, I can't figure out how to configure this. As far as I've been
able to ascertain, I can place one default context in server.xml, such as:
    <Context path="/" docBase="/httpd/docs/one_root"
    etc. />
And this makes the www.one.com work just fine. But what about www.two.com?
Is there any way to establish a context such that both of them can liberally
use JSP pages, or do I have to do something contrived like placing all JSPs
for all sites except one of them in a subdirectory?

Please send help! This is difficult; I don't want to have to rewrite all my
URLs to include a preceeding "/oneJSP" or "/twoJSP" or whatever...

Bleah.
--
Zacharias J. Beckman - zbeckman@creativesun.com - (U.S.) 305-281-8701
Creative Sun Inc., Publishing for the Internet - http://www.creativesun.com

Far better it is to dare mighty things, to win glorious triumphs, even
though checkered by failure, than to take rank with those poor spirits who
neither enjoy nor suffer much, because they live in the gray twilight that
knows neither victory nor defeat. -- Theodore Roosevelt