You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Craig Longman <cr...@begeek.com> on 2002/09/11 08:07:48 UTC

more configuration questions

ok.  now i've got another problem, related to using apache to proxy and
the perceived hostname, with setting of session cookie names.

to get around the restriction in tomcat of forcing applications in
subdirectories on the url, i have the following setup:

  server.begeek.com -> proxies to server.local.begeek.com/server/

then, tomcat is configured to with a host element of
server.local.begeek.com and a context element of /server.  all is good
and everything 'looks' right.

now, i noticed that i was getting new sessions for every hit, and found
that indeed the cookie domain was restricted to server.local.begeek.com,
which in retrospect is correct.  so far so good.

trying to resolve this though, i find the only obvious way is to put a
proxyName and a proxyPort entry in the connector element.  well, i have
been sharing one connector for the whole shebang so far, so i can't put
it in there easily, using this scheme, i'll need to create multiple
connectors, one for each webapp i want.

what are the overheads associated with multiple connectors running?  and
how could i have multiple mount targets in apache?
  JkMount / ajp13-2
with multiple entries in the worker.properties?

is there any other way to set this on the context level?  that would be
ideal for my purposes.  one would think that makes sense, right?  i
mean, the getServerName() and getServerPort() are both in the
ServletContext, which is kind of what we're talking about here.  most of
the methods in ServletContext return data that are very specific to an
individual context (as in the server.xml contexts).

once again, suggestions greatly appreciated.

-- 

    CraigL->Thx();
    Be Developer ID: 5852


Re: more configuration questions

Posted by Craig Longman <cr...@begeek.com>.
On Wed, 2002-09-11 at 02:07, Craig Longman wrote:
>
> is there any other way to set this on the context level?  that would be
> ideal for my purposes.  one would think that makes sense, right?  i
> mean, the getServerName() and getServerPort() are both in the
> ServletContext, which is kind of what we're talking about here.  most of
> the methods in ServletContext return data that are very specific to an
> individual context (as in the server.xml contexts).

not sure what i was thinking here, getServerName/Port are, of course, in
the ServletRequest object. sigh.

but anyway, the question is still, can i set the proxy stuff at the
context level, or can i at least change the servername for the session
cookie stuff to be at the context level.

cheers,

-- 

    CraigL->Thx();
    Be Developer ID: 5852