You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Wm.A.Stafford" <st...@marine.rutgers.edu> on 2007/01/23 15:51:30 UTC

[users@httpd] Apache + Tomcat = no session management

We deployed our Tomcat-based system on an Apache+Tomcat site and
session management disappeared completely.  Every Tomcat access to the
session resulted in the creation of a new session.  Url rewriting did
not solve the problem.

This is apparently a well known situtuation.  Searching around I found
references to this situation going back to 2001.  However, I was unable
to find what needs to change to enable session management in an
Apache+Tomcat environment.

Since the application works normally on Tomcat only, it seems pretty
certain that Apache needs to be configured to handle Tomcat session
management either by cookies or url rewriting or both.

Can someone describe what is going on and what needs to be done?

Thanks,
-=beeky

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache + Tomcat = no session management

Posted by "Wm.A.Stafford" <st...@marine.rutgers.edu>.
Sander,

    What progress I've made.  I've gone from Apache-clueless to 
answering my own questions.

    Well, not quite answering but at least shedding some light.  If I 
use url rewriting our Apache 1.3 does not recognize the url because it 
thinks the jsessionid is part of the context name, so a 404 results.  
Apparently, a rewriting rule can be used to avoid this.

  <IfModule mod_rewrite.c>
      RewriteEngine     on
      # Force URLs with a jsessionid to go to Tomcat. Necessary because
      # Apache doesn't recognise that the semi-colon is special.
      RewriteRule       ^(/.*;jsessionid=.*)$   $1 [T=jserv-servlet]
  </IfModule>

    Your original suggestion for making the proxy and proxied context 
the same solved our problem.  But perhaps this will be useful for those 
who must use url rewriting and Apache 1.3.

    Thanks again for your great support,
    -=bill

Sander Temme wrote:
>
> On Jan 26, 2007, at 10:48 AM, Wm.A.Stafford wrote:
>
>>    I forgot to ask about one more aspect of this situation.  When we 
>> first realized that session cookies were not coming in to the app we 
>> tried url rewriting and that did not resolve the problem.  Does 
>> Apache 1.3 do something to urls that have an explicit session id?
>> ex. ip_and_context ;jsessionid=blah de blah de blah &params.
>
> This is not ringing a bell for me: mod_proxy should just forward the 
> request query string unaltered.
>
>>    While searching for the solution to this I saw a web page that 
>> said a rewrite rule was required if url rewriting is used.  Is this 
>> the case and, if so, could you give me an example rule or direct me 
>> to a source for this rule.
>
> Perhaps someone else has any direct experience with this.
>
> S.
>
>> Sander Temme wrote:
>>>
>>> On Jan 25, 2007, at 1:20 PM, Wm.A.Stafford wrote:
>>>
>>>> Sander,
>>>>
>>>> Here is a cookie copied from Firefox cookie viewer when
>>>> the Apache+Tomcat machine was accessed from another machine.
>>>>
>>>> Name: JSESSIONID
>>>> Content: 10FA6EB4F5B24CBA716A7F5DAD1F4B3F
>>>> Host: iobis.marine.rutgers.edu
>>>> Path: /OBISDEV
>>>         ^^^^^^^^
>>>> Send For: Any type  of connecion
>>>> Expires: at end of session
>>>>
>>>> The URL to access the Apache+Tomcat application is:
>>>> http://iobis.marine.rutgers.edu/OBISBETA/OBIS.jsp
>>>                                  ^^^^^^^^^
>>>>
>>>> Just a reminder of the mapping from httpd.conf
>>>> ProxyPass /OBISBETA http://localhost:8082/OBISDEV
>>>> ProxyPassReverse /OBISBETA localhost:8082/OBISDEV
>>>                    ^^^^^^^^^               ^^^^^^^^
>>>
>>> As you can see, the Path: in the cookie does not match the URL path, 
>>> so the session cookie will not get sent back to the server.
>>>
>>> Since the mod_proxy of Apache 1.3 doesn't support rewriting Cookie 
>>> paths, your only option is to change the ProxyPass local path to 
>>> match the back-end (and connect to that), or have Tomcat match its 
>>> mount path to what the front-end thinks it is.
>>>
>>> That's really all I can think of right now.
>>>
>>> S.
>>>
>>>
>>>>
>>>> Thanks,
>>>> -=bill
>>>>
>>>>
>>>> Sander Temme wrote:
>>>>>
>>>>> On Jan 24, 2007, at 11:00 AM, Wm.A.Stafford wrote:
>>>>>
>>>>>>    A bit more info has emerged, the admin believes  the Apache 
>>>>>> version is  1.3.20.
>>>>>
>>>>> Running httpd -v will take away any shred of doubt.
>>>>>
>>>>>>>    I'll see if there is any interest in moving to the latest 
>>>>>>> Apache but at this point I think that is probably not an option 
>>>>>>> because there are a lot of other users of this system and they 
>>>>>>> would all have to buy in.  So I will need to proceed with 
>>>>>>> configuration of the existing version.
>>>>>
>>>>> Apache has made great strides since 1.3.20.  For starters, any 1.3 
>>>>> version after that contains security fixes that you might want.  
>>>>> As no other changes are made to that branch, an upgrade should not 
>>>>> cause you any problems.
>>>>>
>>>>> The proxy module that came with Apache 1.3 did not have the 
>>>>> ProxyReverseCookiePath directive that I talked about earlier. See
>>>>>
>>>>> http://httpd.apache.org/docs/1.3/mod/mod_proxy.html
>>>>>
>>>>> for documentation on the 1.3 mod_proxy module.
>>>>>
>>>>> Before we make any more guesses about the nature of your problem, 
>>>>> I would like to learn from you whether the Cookie path mismatch is 
>>>>> actually causing your issue.  Could you run the following test on 
>>>>> your application:
>>>>>
>>>>> 1) Clear your browser cache and cookie store
>>>>> 2) Connect to your application through the Apache proxy and log in
>>>>> 3) Go back to your cookie store, see if anything emerged and send 
>>>>> us the
>>>>>    contents of any JSESSIONID cookies. Feel free to obfuscate as 
>>>>> you see
>>>>>    fit, as long as we have enough information to work with (domain 
>>>>> and path
>>>>>    are of paramount interest, as well as the complete URL you used to
>>>>>    access your application in step 2.
>>>>>
>>>>> Thanks,
>>>>>
>>>>> S.
>>>>>
>>>>> --sctemme@apache.org            http://www.temme.net/sander/
>>>>> PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF
>>>>>
>>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> The official User-To-User support forum of the Apache HTTP Server 
>>>> Project.
>>>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>>>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>>>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>>>> For additional commands, e-mail: users-help@httpd.apache.org
>>>>
>>>>
>>>
>>>
>>> --sctemme@apache.org            http://www.temme.net/sander/
>>> PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> The official User-To-User support forum of the Apache HTTP Server 
>> Project.
>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>>
>
>
> --sctemme@apache.org            http://www.temme.net/sander/
> PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF
>
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache + Tomcat = no session management

Posted by Sander Temme <sc...@apache.org>.
On Jan 26, 2007, at 10:48 AM, Wm.A.Stafford wrote:

>    I forgot to ask about one more aspect of this situation.  When  
> we first realized that session cookies were not coming in to the  
> app we tried url rewriting and that did not resolve the problem.   
> Does Apache 1.3 do something to urls that have an explicit session id?
> ex. ip_and_context ;jsessionid=blah de blah de blah &params.

This is not ringing a bell for me: mod_proxy should just forward the  
request query string unaltered.

>    While searching for the solution to this I saw a web page that  
> said a rewrite rule was required if url rewriting is used.  Is this  
> the case and, if so, could you give me an example rule or direct me  
> to a source for this rule.

Perhaps someone else has any direct experience with this.

S.

> Sander Temme wrote:
>>
>> On Jan 25, 2007, at 1:20 PM, Wm.A.Stafford wrote:
>>
>>> Sander,
>>>
>>> Here is a cookie copied from Firefox cookie viewer when
>>> the Apache+Tomcat machine was accessed from another machine.
>>>
>>> Name: JSESSIONID
>>> Content: 10FA6EB4F5B24CBA716A7F5DAD1F4B3F
>>> Host: iobis.marine.rutgers.edu
>>> Path: /OBISDEV
>>         ^^^^^^^^
>>> Send For: Any type  of connecion
>>> Expires: at end of session
>>>
>>> The URL to access the Apache+Tomcat application is:
>>> http://iobis.marine.rutgers.edu/OBISBETA/OBIS.jsp
>>                                  ^^^^^^^^^
>>>
>>> Just a reminder of the mapping from httpd.conf
>>> ProxyPass /OBISBETA http://localhost:8082/OBISDEV
>>> ProxyPassReverse /OBISBETA localhost:8082/OBISDEV
>>                    ^^^^^^^^^               ^^^^^^^^
>>
>> As you can see, the Path: in the cookie does not match the URL  
>> path, so the session cookie will not get sent back to the server.
>>
>> Since the mod_proxy of Apache 1.3 doesn't support rewriting Cookie  
>> paths, your only option is to change the ProxyPass local path to  
>> match the back-end (and connect to that), or have Tomcat match its  
>> mount path to what the front-end thinks it is.
>>
>> That's really all I can think of right now.
>>
>> S.
>>
>>
>>>
>>> Thanks,
>>> -=bill
>>>
>>>
>>> Sander Temme wrote:
>>>>
>>>> On Jan 24, 2007, at 11:00 AM, Wm.A.Stafford wrote:
>>>>
>>>>>    A bit more info has emerged, the admin believes  the Apache  
>>>>> version is  1.3.20.
>>>>
>>>> Running httpd -v will take away any shred of doubt.
>>>>
>>>>>>    I'll see if there is any interest in moving to the latest  
>>>>>> Apache but at this point I think that is probably not an  
>>>>>> option because there are a lot of other users of this system  
>>>>>> and they would all have to buy in.  So I will need to proceed  
>>>>>> with configuration of the existing version.
>>>>
>>>> Apache has made great strides since 1.3.20.  For starters, any  
>>>> 1.3 version after that contains security fixes that you might  
>>>> want.  As no other changes are made to that branch, an upgrade  
>>>> should not cause you any problems.
>>>>
>>>> The proxy module that came with Apache 1.3 did not have the  
>>>> ProxyReverseCookiePath directive that I talked about earlier. See
>>>>
>>>> http://httpd.apache.org/docs/1.3/mod/mod_proxy.html
>>>>
>>>> for documentation on the 1.3 mod_proxy module.
>>>>
>>>> Before we make any more guesses about the nature of your  
>>>> problem, I would like to learn from you whether the Cookie path  
>>>> mismatch is actually causing your issue.  Could you run the  
>>>> following test on your application:
>>>>
>>>> 1) Clear your browser cache and cookie store
>>>> 2) Connect to your application through the Apache proxy and log in
>>>> 3) Go back to your cookie store, see if anything emerged and  
>>>> send us the
>>>>    contents of any JSESSIONID cookies. Feel free to obfuscate as  
>>>> you see
>>>>    fit, as long as we have enough information to work with  
>>>> (domain and path
>>>>    are of paramount interest, as well as the complete URL you  
>>>> used to
>>>>    access your application in step 2.
>>>>
>>>> Thanks,
>>>>
>>>> S.
>>>>
>>>> --sctemme@apache.org            http://www.temme.net/sander/
>>>> PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF
>>>>
>>>>
>>>
>>>
>>> -------------------------------------------------------------------- 
>>> -
>>> The official User-To-User support forum of the Apache HTTP Server  
>>> Project.
>>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>>> For additional commands, e-mail: users-help@httpd.apache.org
>>>
>>>
>>
>>
>> --sctemme@apache.org            http://www.temme.net/sander/
>> PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF
>>
>>
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server  
> Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>


-- 
sctemme@apache.org            http://www.temme.net/sander/
PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF



Re: [users@httpd] Apache + Tomcat = no session management

Posted by "Wm.A.Stafford" <st...@marine.rutgers.edu>.
Sander,

    I forgot to ask about one more aspect of this situation.  When we 
first realized that session cookies were not coming in to the app we 
tried url rewriting and that did not resolve the problem.  Does Apache 
1.3 do something to urls that have an explicit session id?
ex. ip_and_context ;jsessionid=blah de blah de blah &params.

    While searching for the solution to this I saw a web page that said 
a rewrite rule was required if url rewriting is used.  Is this the case 
and, if so, could you give me an example rule or direct me to a source 
for this rule.

    Thanks again,
    -=bill

Sander Temme wrote:
>
> On Jan 25, 2007, at 1:20 PM, Wm.A.Stafford wrote:
>
>> Sander,
>>
>> Here is a cookie copied from Firefox cookie viewer when
>> the Apache+Tomcat machine was accessed from another machine.
>>
>> Name: JSESSIONID
>> Content: 10FA6EB4F5B24CBA716A7F5DAD1F4B3F
>> Host: iobis.marine.rutgers.edu
>> Path: /OBISDEV
>         ^^^^^^^^
>> Send For: Any type  of connecion
>> Expires: at end of session
>>
>> The URL to access the Apache+Tomcat application is:
>> http://iobis.marine.rutgers.edu/OBISBETA/OBIS.jsp
>                                  ^^^^^^^^^
>>
>> Just a reminder of the mapping from httpd.conf
>> ProxyPass /OBISBETA http://localhost:8082/OBISDEV
>> ProxyPassReverse /OBISBETA localhost:8082/OBISDEV
>                    ^^^^^^^^^               ^^^^^^^^
>
> As you can see, the Path: in the cookie does not match the URL path, 
> so the session cookie will not get sent back to the server.
>
> Since the mod_proxy of Apache 1.3 doesn't support rewriting Cookie 
> paths, your only option is to change the ProxyPass local path to match 
> the back-end (and connect to that), or have Tomcat match its mount 
> path to what the front-end thinks it is.
>
> That's really all I can think of right now.
>
> S.
>
>
>>
>> Thanks,
>> -=bill
>>
>>
>> Sander Temme wrote:
>>>
>>> On Jan 24, 2007, at 11:00 AM, Wm.A.Stafford wrote:
>>>
>>>>    A bit more info has emerged, the admin believes  the Apache 
>>>> version is  1.3.20.
>>>
>>> Running httpd -v will take away any shred of doubt.
>>>
>>>>>    I'll see if there is any interest in moving to the latest 
>>>>> Apache but at this point I think that is probably not an option 
>>>>> because there are a lot of other users of this system and they 
>>>>> would all have to buy in.  So I will need to proceed with 
>>>>> configuration of the existing version.
>>>
>>> Apache has made great strides since 1.3.20.  For starters, any 1.3 
>>> version after that contains security fixes that you might want.  As 
>>> no other changes are made to that branch, an upgrade should not 
>>> cause you any problems.
>>>
>>> The proxy module that came with Apache 1.3 did not have the 
>>> ProxyReverseCookiePath directive that I talked about earlier. See
>>>
>>> http://httpd.apache.org/docs/1.3/mod/mod_proxy.html
>>>
>>> for documentation on the 1.3 mod_proxy module.
>>>
>>> Before we make any more guesses about the nature of your problem, I 
>>> would like to learn from you whether the Cookie path mismatch is 
>>> actually causing your issue.  Could you run the following test on 
>>> your application:
>>>
>>> 1) Clear your browser cache and cookie store
>>> 2) Connect to your application through the Apache proxy and log in
>>> 3) Go back to your cookie store, see if anything emerged and send us 
>>> the
>>>    contents of any JSESSIONID cookies. Feel free to obfuscate as you 
>>> see
>>>    fit, as long as we have enough information to work with (domain 
>>> and path
>>>    are of paramount interest, as well as the complete URL you used to
>>>    access your application in step 2.
>>>
>>> Thanks,
>>>
>>> S.
>>>
>>> --sctemme@apache.org            http://www.temme.net/sander/
>>> PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> The official User-To-User support forum of the Apache HTTP Server 
>> Project.
>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>>
>
>
> --sctemme@apache.org            http://www.temme.net/sander/
> PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF
>
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache + Tomcat = no session management

Posted by Jim Roycroft <ji...@codesilver.ca>.
There may be another alternative here if you are running Tomcat 5.5:

Set the proxyName, proxyPort, and emptySessionPath within your connector in
Tomcat's server.xml file.

In this case, I would set proxyName="iobis.marine.rutgers.edu",
proxyPort="80", and emptySessionpath="true".

This should result in Tomcat setting a cookie (which will get sent through
the proxy) with the external hostname, the external port, and a "/" where
"/OBISDEV" used to be.

This means you don't have to use the ProxyPassReverseCookieDomain and
ProxyPassReverseCookiePath directives from Apache 2.2 (even if you had that
option).

I hope I haven't missed anything here (I am assuming you are only running
one Tomcat server behind the proxy).

Have a look at the "Proxy Support HOWTO" and the Server Config Reference in
the Tomcat docs for more info.

Jim



Wm.A.Stafford wrote:
> 
> Sander,
> 
>     Thanks a million for all your help! 
> 
>     -=bill
> 
> Sander Temme wrote:
>>
>> On Jan 25, 2007, at 1:20 PM, Wm.A.Stafford wrote:
>>
>>> Sander,
>>>
>>> Here is a cookie copied from Firefox cookie viewer when
>>> the Apache+Tomcat machine was accessed from another machine.
>>>
>>> Name: JSESSIONID
>>> Content: 10FA6EB4F5B24CBA716A7F5DAD1F4B3F
>>> Host: iobis.marine.rutgers.edu
>>> Path: /OBISDEV
>>         ^^^^^^^^
>>> Send For: Any type  of connecion
>>> Expires: at end of session
>>>
>>> The URL to access the Apache+Tomcat application is:
>>> http://iobis.marine.rutgers.edu/OBISBETA/OBIS.jsp
>>                                  ^^^^^^^^^
>>>
>>> Just a reminder of the mapping from httpd.conf
>>> ProxyPass /OBISBETA http://localhost:8082/OBISDEV
>>> ProxyPassReverse /OBISBETA localhost:8082/OBISDEV
>>                    ^^^^^^^^^               ^^^^^^^^
>>
>> As you can see, the Path: in the cookie does not match the URL path, 
>> so the session cookie will not get sent back to the server.
>>
>> Since the mod_proxy of Apache 1.3 doesn't support rewriting Cookie 
>> paths, your only option is to change the ProxyPass local path to match 
>> the back-end (and connect to that), or have Tomcat match its mount 
>> path to what the front-end thinks it is.
>>
>> That's really all I can think of right now.
>>
>> S.
>>
>>
>>>
>>> Thanks,
>>> -=bill
>>>
>>>
>>> Sander Temme wrote:
>>>>
>>>> On Jan 24, 2007, at 11:00 AM, Wm.A.Stafford wrote:
>>>>
>>>>>    A bit more info has emerged, the admin believes  the Apache 
>>>>> version is  1.3.20.
>>>>
>>>> Running httpd -v will take away any shred of doubt.
>>>>
>>>>>>    I'll see if there is any interest in moving to the latest 
>>>>>> Apache but at this point I think that is probably not an option 
>>>>>> because there are a lot of other users of this system and they 
>>>>>> would all have to buy in.  So I will need to proceed with 
>>>>>> configuration of the existing version.
>>>>
>>>> Apache has made great strides since 1.3.20.  For starters, any 1.3 
>>>> version after that contains security fixes that you might want.  As 
>>>> no other changes are made to that branch, an upgrade should not 
>>>> cause you any problems.
>>>>
>>>> The proxy module that came with Apache 1.3 did not have the 
>>>> ProxyReverseCookiePath directive that I talked about earlier. See
>>>>
>>>> http://httpd.apache.org/docs/1.3/mod/mod_proxy.html
>>>>
>>>> for documentation on the 1.3 mod_proxy module.
>>>>
>>>> Before we make any more guesses about the nature of your problem, I 
>>>> would like to learn from you whether the Cookie path mismatch is 
>>>> actually causing your issue.  Could you run the following test on 
>>>> your application:
>>>>
>>>> 1) Clear your browser cache and cookie store
>>>> 2) Connect to your application through the Apache proxy and log in
>>>> 3) Go back to your cookie store, see if anything emerged and send us 
>>>> the
>>>>    contents of any JSESSIONID cookies. Feel free to obfuscate as you 
>>>> see
>>>>    fit, as long as we have enough information to work with (domain 
>>>> and path
>>>>    are of paramount interest, as well as the complete URL you used to
>>>>    access your application in step 2.
>>>>
>>>> Thanks,
>>>>
>>>> S.
>>>>
>>>> --sctemme@apache.org            http://www.temme.net/sander/
>>>> PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF
>>>>
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> The official User-To-User support forum of the Apache HTTP Server 
>>> Project.
>>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>>> For additional commands, e-mail: users-help@httpd.apache.org
>>>
>>>
>>
>>
>> --sctemme@apache.org            http://www.temme.net/sander/
>> PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF
>>
>>
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Apache-%2B-Tomcat-%3D-no-session-management-tf3064563.html#a8872328
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache + Tomcat = no session management

Posted by "Wm.A.Stafford" <st...@marine.rutgers.edu>.
Sander,

    Thanks a million for all your help! 

    -=bill

Sander Temme wrote:
>
> On Jan 25, 2007, at 1:20 PM, Wm.A.Stafford wrote:
>
>> Sander,
>>
>> Here is a cookie copied from Firefox cookie viewer when
>> the Apache+Tomcat machine was accessed from another machine.
>>
>> Name: JSESSIONID
>> Content: 10FA6EB4F5B24CBA716A7F5DAD1F4B3F
>> Host: iobis.marine.rutgers.edu
>> Path: /OBISDEV
>         ^^^^^^^^
>> Send For: Any type  of connecion
>> Expires: at end of session
>>
>> The URL to access the Apache+Tomcat application is:
>> http://iobis.marine.rutgers.edu/OBISBETA/OBIS.jsp
>                                  ^^^^^^^^^
>>
>> Just a reminder of the mapping from httpd.conf
>> ProxyPass /OBISBETA http://localhost:8082/OBISDEV
>> ProxyPassReverse /OBISBETA localhost:8082/OBISDEV
>                    ^^^^^^^^^               ^^^^^^^^
>
> As you can see, the Path: in the cookie does not match the URL path, 
> so the session cookie will not get sent back to the server.
>
> Since the mod_proxy of Apache 1.3 doesn't support rewriting Cookie 
> paths, your only option is to change the ProxyPass local path to match 
> the back-end (and connect to that), or have Tomcat match its mount 
> path to what the front-end thinks it is.
>
> That's really all I can think of right now.
>
> S.
>
>
>>
>> Thanks,
>> -=bill
>>
>>
>> Sander Temme wrote:
>>>
>>> On Jan 24, 2007, at 11:00 AM, Wm.A.Stafford wrote:
>>>
>>>>    A bit more info has emerged, the admin believes  the Apache 
>>>> version is  1.3.20.
>>>
>>> Running httpd -v will take away any shred of doubt.
>>>
>>>>>    I'll see if there is any interest in moving to the latest 
>>>>> Apache but at this point I think that is probably not an option 
>>>>> because there are a lot of other users of this system and they 
>>>>> would all have to buy in.  So I will need to proceed with 
>>>>> configuration of the existing version.
>>>
>>> Apache has made great strides since 1.3.20.  For starters, any 1.3 
>>> version after that contains security fixes that you might want.  As 
>>> no other changes are made to that branch, an upgrade should not 
>>> cause you any problems.
>>>
>>> The proxy module that came with Apache 1.3 did not have the 
>>> ProxyReverseCookiePath directive that I talked about earlier. See
>>>
>>> http://httpd.apache.org/docs/1.3/mod/mod_proxy.html
>>>
>>> for documentation on the 1.3 mod_proxy module.
>>>
>>> Before we make any more guesses about the nature of your problem, I 
>>> would like to learn from you whether the Cookie path mismatch is 
>>> actually causing your issue.  Could you run the following test on 
>>> your application:
>>>
>>> 1) Clear your browser cache and cookie store
>>> 2) Connect to your application through the Apache proxy and log in
>>> 3) Go back to your cookie store, see if anything emerged and send us 
>>> the
>>>    contents of any JSESSIONID cookies. Feel free to obfuscate as you 
>>> see
>>>    fit, as long as we have enough information to work with (domain 
>>> and path
>>>    are of paramount interest, as well as the complete URL you used to
>>>    access your application in step 2.
>>>
>>> Thanks,
>>>
>>> S.
>>>
>>> --sctemme@apache.org            http://www.temme.net/sander/
>>> PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> The official User-To-User support forum of the Apache HTTP Server 
>> Project.
>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>>
>
>
> --sctemme@apache.org            http://www.temme.net/sander/
> PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF
>
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache + Tomcat = no session management

Posted by Sander Temme <sc...@apache.org>.
On Jan 25, 2007, at 1:20 PM, Wm.A.Stafford wrote:

> Sander,
>
> Here is a cookie copied from Firefox cookie viewer when
> the Apache+Tomcat machine was accessed from another machine.
>
> Name: JSESSIONID
> Content: 10FA6EB4F5B24CBA716A7F5DAD1F4B3F
> Host: iobis.marine.rutgers.edu
> Path: /OBISDEV
         ^^^^^^^^
> Send For: Any type  of connecion
> Expires: at end of session
>
> The URL to access the Apache+Tomcat application is:
> http://iobis.marine.rutgers.edu/OBISBETA/OBIS.jsp
                                  ^^^^^^^^^
>
> Just a reminder of the mapping from httpd.conf
> ProxyPass /OBISBETA http://localhost:8082/OBISDEV
> ProxyPassReverse /OBISBETA localhost:8082/OBISDEV
                    ^^^^^^^^^               ^^^^^^^^

As you can see, the Path: in the cookie does not match the URL path,  
so the session cookie will not get sent back to the server.

Since the mod_proxy of Apache 1.3 doesn't support rewriting Cookie  
paths, your only option is to change the ProxyPass local path to  
match the back-end (and connect to that), or have Tomcat match its  
mount path to what the front-end thinks it is.

That's really all I can think of right now.

S.


>
> Thanks,
> -=bill
>
>
> Sander Temme wrote:
>>
>> On Jan 24, 2007, at 11:00 AM, Wm.A.Stafford wrote:
>>
>>>    A bit more info has emerged, the admin believes  the Apache  
>>> version is  1.3.20.
>>
>> Running httpd -v will take away any shred of doubt.
>>
>>>>    I'll see if there is any interest in moving to the latest  
>>>> Apache but at this point I think that is probably not an option  
>>>> because there are a lot of other users of this system and they  
>>>> would all have to buy in.  So I will need to proceed with  
>>>> configuration of the existing version.
>>
>> Apache has made great strides since 1.3.20.  For starters, any 1.3  
>> version after that contains security fixes that you might want.   
>> As no other changes are made to that branch, an upgrade should not  
>> cause you any problems.
>>
>> The proxy module that came with Apache 1.3 did not have the  
>> ProxyReverseCookiePath directive that I talked about earlier. See
>>
>> http://httpd.apache.org/docs/1.3/mod/mod_proxy.html
>>
>> for documentation on the 1.3 mod_proxy module.
>>
>> Before we make any more guesses about the nature of your problem,  
>> I would like to learn from you whether the Cookie path mismatch is  
>> actually causing your issue.  Could you run the following test on  
>> your application:
>>
>> 1) Clear your browser cache and cookie store
>> 2) Connect to your application through the Apache proxy and log in
>> 3) Go back to your cookie store, see if anything emerged and send  
>> us the
>>    contents of any JSESSIONID cookies. Feel free to obfuscate as  
>> you see
>>    fit, as long as we have enough information to work with (domain  
>> and path
>>    are of paramount interest, as well as the complete URL you used to
>>    access your application in step 2.
>>
>> Thanks,
>>
>> S.
>>
>> --sctemme@apache.org            http://www.temme.net/sander/
>> PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF
>>
>>
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server  
> Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>


-- 
sctemme@apache.org            http://www.temme.net/sander/
PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF



Re: [users@httpd] Apache + Tomcat = no session management

Posted by "Wm.A.Stafford" <st...@marine.rutgers.edu>.
Sander,

Here is a cookie copied from Firefox cookie viewer when
the Apache+Tomcat machine was accessed from another machine.

Name: JSESSIONID
Content: 10FA6EB4F5B24CBA716A7F5DAD1F4B3F
Host: iobis.marine.rutgers.edu
Path: /OBISDEV
Send For: Any type  of connecion
Expires: at end of session

The URL to access the Apache+Tomcat application is:
http://iobis.marine.rutgers.edu/OBISBETA/OBIS.jsp

Just a reminder of the mapping from httpd.conf
ProxyPass /OBISBETA http://localhost:8082/OBISDEV
ProxyPassReverse /OBISBETA localhost:8082/OBISDEV

Thanks,
-=bill


Sander Temme wrote:
>
> On Jan 24, 2007, at 11:00 AM, Wm.A.Stafford wrote:
>
>>    A bit more info has emerged, the admin believes  the Apache 
>> version is  1.3.20.
>
> Running httpd -v will take away any shred of doubt.
>
>>>    I'll see if there is any interest in moving to the latest Apache 
>>> but at this point I think that is probably not an option because 
>>> there are a lot of other users of this system and they would all 
>>> have to buy in.  So I will need to proceed with configuration of the 
>>> existing version.
>
> Apache has made great strides since 1.3.20.  For starters, any 1.3 
> version after that contains security fixes that you might want.  As no 
> other changes are made to that branch, an upgrade should not cause you 
> any problems.
>
> The proxy module that came with Apache 1.3 did not have the 
> ProxyReverseCookiePath directive that I talked about earlier. See
>
> http://httpd.apache.org/docs/1.3/mod/mod_proxy.html
>
> for documentation on the 1.3 mod_proxy module.
>
> Before we make any more guesses about the nature of your problem, I 
> would like to learn from you whether the Cookie path mismatch is 
> actually causing your issue.  Could you run the following test on your 
> application:
>
> 1) Clear your browser cache and cookie store
> 2) Connect to your application through the Apache proxy and log in
> 3) Go back to your cookie store, see if anything emerged and send us the
>    contents of any JSESSIONID cookies. Feel free to obfuscate as you see
>    fit, as long as we have enough information to work with (domain and 
> path
>    are of paramount interest, as well as the complete URL you used to
>    access your application in step 2.
>
> Thanks,
>
> S.
>
> --sctemme@apache.org            http://www.temme.net/sander/
> PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF
>
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache + Tomcat = no session management

Posted by Sander Temme <sc...@apache.org>.
On Jan 24, 2007, at 11:00 AM, Wm.A.Stafford wrote:

>    A bit more info has emerged, the admin believes  the Apache  
> version is  1.3.20.

Running httpd -v will take away any shred of doubt.

>>    I'll see if there is any interest in moving to the latest  
>> Apache but at this point I think that is probably not an option  
>> because there are a lot of other users of this system and they  
>> would all have to buy in.  So I will need to proceed with  
>> configuration of the existing version.

Apache has made great strides since 1.3.20.  For starters, any 1.3  
version after that contains security fixes that you might want.  As  
no other changes are made to that branch, an upgrade should not cause  
you any problems.

The proxy module that came with Apache 1.3 did not have the  
ProxyReverseCookiePath directive that I talked about earlier. See

http://httpd.apache.org/docs/1.3/mod/mod_proxy.html

for documentation on the 1.3 mod_proxy module.

Before we make any more guesses about the nature of your problem, I  
would like to learn from you whether the Cookie path mismatch is  
actually causing your issue.  Could you run the following test on  
your application:

1) Clear your browser cache and cookie store
2) Connect to your application through the Apache proxy and log in
3) Go back to your cookie store, see if anything emerged and send us the
    contents of any JSESSIONID cookies. Feel free to obfuscate as you  
see
    fit, as long as we have enough information to work with (domain  
and path
    are of paramount interest, as well as the complete URL you used to
    access your application in step 2.

Thanks,

S.

-- 
sctemme@apache.org            http://www.temme.net/sander/
PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF



Re: [users@httpd] Apache + Tomcat = no session management

Posted by "Wm.A.Stafford" <st...@marine.rutgers.edu>.
Sander,

    A bit more info has emerged, the admin believes  the Apache version 
is  1.3.20.

     -=bill

Wm.A.Stafford wrote:
> Sander,
>
>    Good news and bad news.  The admin confirmed that Apache is being 
> used as a proxy but she does not know what version of Apache is being 
> run but she thought it was 1.2.  I looked around on the server and the 
> date of Apache.exe is 6/23/2002.  Is there a file that is delivered 
> with the executable that would have the version number?
>
>    I'll see if there is any interest in moving to the latest Apache 
> but at this point I think that is probably not an option because there 
> are a lot of other users of this system and they would all have to buy 
> in.  So I will need to proceed with configuration of the existing 
> version.
>
>    -=bill
>
> Sander Temme wrote:
>>
>> On Jan 23, 2007, at 1:30 PM, Wm.A.Stafford wrote:
>>
>>>    Thanks for replying to my query.  I don't really know anything 
>>> about Apache.  How would I go about determining how Apache and 
>>> Tomcat interact?  I have the httpd.conf file for the Apache in 
>>> question, can  I  tell from that?
>>>    I have looked through the file and I do not see mod_jk being 
>>> loaded so I think we can rule out that.
>>>
>>>    I see the lines below in httpd.conf does this mean communication 
>>> is  via HTTPProxy? (our app is OBISDEV)
>>>    ProxyPass /OBISBETA http://localhost:8082/OBISDEV
>>>    ProxyPassReverse /OBISBETA localhost:8082/OBISDEV
>>
>> Yes, that looks promising. So, when you connect to your application, 
>> you type in the browser something like:
>>
>> http://yourhostname/OBISBETA/somewebapppath
>>
>> Any request that starts with /OBISBETA will be forwarded to the 
>> latter URL, with whatever came after /OBISBETA (/somewebappath in 
>> this case) tacked on.
>>
>> If the web app decides to write a cookie to the browser, it may 
>> choose to include a path.  Tomcat thinks it's running at /OBISDEV, 
>> which is different from the path seen by the browser.
>>
>> When the browser sends the next request, it'll send any cookie along 
>> that it has cached for the hostname and path under consideration. 
>> Since the browser connects to a different path (/OBISBETA instead of 
>> /OBISDEV), your cookie wont't get sent which your Tomcat will see as 
>> an opportunity to create a brand new session all over again.  If you 
>> open your browser's cookie cache, you should find the orphaned cookie 
>> that you received but didn't send back.
>>
>> Which version of Apache are you using? As of Apache 2.2, we have a 
>> configuration directive 'ProxyPassReverseCookiePath' that can rewrite 
>> such a Cookie path on the proxy. If you are running Apache 2.2.x, 
>> have a look at
>>
>> http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypassreversecookiepath 
>>
>>
>> (hint: put ProxyPassReverseCookiePath /OBISDEV /OBISBETA next to the 
>> ProxyPassReverse directive and restart your Apache)
>>
>>>    I'm sorry to be so clueless but I have absolutely no experience 
>>> with Apache.
>>
>> That's OK, we're here to help.  If you need any more info, perhaps 
>> you can paste us the contents of such an orphaned cookie... don't 
>> worry about the contents (a session ID is just random data as far as 
>> we are concerned), but the cookie name (probably JSESSIONID), domain 
>> and path would be good info.  If you can't find it, clear your 
>> browser cache (on your test machine, don't want you to lose all your 
>> saved logins), access your app and then look what the cat dragged in.
>>
>> S.
>>
>> --sctemme@apache.org            http://www.temme.net/sander/
>> Open Source Software Consultant
>> PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server 
> Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache + Tomcat = no session management

Posted by "Wm.A.Stafford" <st...@marine.rutgers.edu>.
Sander,

    Good news and bad news.  The admin confirmed that Apache is being 
used as a proxy but she does not know what version of Apache is being 
run but she thought it was 1.2.  I looked around on the server and the 
date of Apache.exe is 6/23/2002.  Is there a file that is delivered with 
the executable that would have the version number?

    I'll see if there is any interest in moving to the latest Apache but 
at this point I think that is probably not an option because there are a 
lot of other users of this system and they would all have to buy in.  So 
I will need to proceed with configuration of the existing version.

    -=bill

Sander Temme wrote:
>
> On Jan 23, 2007, at 1:30 PM, Wm.A.Stafford wrote:
>
>>    Thanks for replying to my query.  I don't really know anything 
>> about Apache.  How would I go about determining how Apache and Tomcat 
>> interact?  I have the httpd.conf file for the Apache in question, 
>> can  I  tell from that?
>>    I have looked through the file and I do not see mod_jk being 
>> loaded so I think we can rule out that.
>>
>>    I see the lines below in httpd.conf does this mean communication 
>> is  via HTTPProxy? (our app is OBISDEV)
>>    ProxyPass /OBISBETA http://localhost:8082/OBISDEV
>>    ProxyPassReverse /OBISBETA localhost:8082/OBISDEV
>
> Yes, that looks promising. So, when you connect to your application, 
> you type in the browser something like:
>
> http://yourhostname/OBISBETA/somewebapppath
>
> Any request that starts with /OBISBETA will be forwarded to the latter 
> URL, with whatever came after /OBISBETA (/somewebappath in this case) 
> tacked on.
>
> If the web app decides to write a cookie to the browser, it may choose 
> to include a path.  Tomcat thinks it's running at /OBISDEV, which is 
> different from the path seen by the browser.
>
> When the browser sends the next request, it'll send any cookie along 
> that it has cached for the hostname and path under consideration. 
> Since the browser connects to a different path (/OBISBETA instead of 
> /OBISDEV), your cookie wont't get sent which your Tomcat will see as 
> an opportunity to create a brand new session all over again.  If you 
> open your browser's cookie cache, you should find the orphaned cookie 
> that you received but didn't send back.
>
> Which version of Apache are you using? As of Apache 2.2, we have a 
> configuration directive 'ProxyPassReverseCookiePath' that can rewrite 
> such a Cookie path on the proxy. If you are running Apache 2.2.x, have 
> a look at
>
> http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypassreversecookiepath 
>
>
> (hint: put ProxyPassReverseCookiePath /OBISDEV /OBISBETA next to the 
> ProxyPassReverse directive and restart your Apache)
>
>>    I'm sorry to be so clueless but I have absolutely no experience 
>> with Apache.
>
> That's OK, we're here to help.  If you need any more info, perhaps you 
> can paste us the contents of such an orphaned cookie... don't worry 
> about the contents (a session ID is just random data as far as we are 
> concerned), but the cookie name (probably JSESSIONID), domain and path 
> would be good info.  If you can't find it, clear your browser cache 
> (on your test machine, don't want you to lose all your saved logins), 
> access your app and then look what the cat dragged in.
>
> S.
>
> --sctemme@apache.org            http://www.temme.net/sander/
> Open Source Software Consultant
> PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF
>
>
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache + Tomcat = no session management

Posted by Sander Temme <sc...@apache.org>.
On Jan 23, 2007, at 1:30 PM, Wm.A.Stafford wrote:

>    Thanks for replying to my query.  I don't really know anything  
> about Apache.  How would I go about determining how Apache and  
> Tomcat interact?  I have the httpd.conf file for the Apache in  
> question, can  I  tell from that?
>    I have looked through the file and I do not see mod_jk being  
> loaded so I think we can rule out that.
>
>    I see the lines below in httpd.conf does this mean communication  
> is  via HTTPProxy? (our app is OBISDEV)
>    ProxyPass /OBISBETA http://localhost:8082/OBISDEV
>    ProxyPassReverse /OBISBETA localhost:8082/OBISDEV

Yes, that looks promising. So, when you connect to your application,  
you type in the browser something like:

http://yourhostname/OBISBETA/somewebapppath

Any request that starts with /OBISBETA will be forwarded to the  
latter URL, with whatever came after /OBISBETA (/somewebappath in  
this case) tacked on.

If the web app decides to write a cookie to the browser, it may  
choose to include a path.  Tomcat thinks it's running at /OBISDEV,  
which is different from the path seen by the browser.

When the browser sends the next request, it'll send any cookie along  
that it has cached for the hostname and path under consideration.  
Since the browser connects to a different path (/OBISBETA instead of / 
OBISDEV), your cookie wont't get sent which your Tomcat will see as  
an opportunity to create a brand new session all over again.  If you  
open your browser's cookie cache, you should find the orphaned cookie  
that you received but didn't send back.

Which version of Apache are you using? As of Apache 2.2, we have a  
configuration directive 'ProxyPassReverseCookiePath' that can rewrite  
such a Cookie path on the proxy. If you are running Apache 2.2.x,  
have a look at

http://httpd.apache.org/docs/2.2/mod/ 
mod_proxy.html#proxypassreversecookiepath

(hint: put ProxyPassReverseCookiePath /OBISDEV /OBISBETA next to the  
ProxyPassReverse directive and restart your Apache)

>    I'm sorry to be so clueless but I have absolutely no experience  
> with Apache.

That's OK, we're here to help.  If you need any more info, perhaps  
you can paste us the contents of such an orphaned cookie... don't  
worry about the contents (a session ID is just random data as far as  
we are concerned), but the cookie name (probably JSESSIONID), domain  
and path would be good info.  If you can't find it, clear your  
browser cache (on your test machine, don't want you to lose all your  
saved logins), access your app and then look what the cat dragged in.

S.

-- 
sctemme@apache.org            http://www.temme.net/sander/
Open Source Software Consultant
PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF




Re: [users@httpd] Apache + Tomcat = no session management

Posted by "Wm.A.Stafford" <st...@marine.rutgers.edu>.
Sander,

    Thanks for replying to my query.  I don't really know anything about 
Apache.  How would I go about determining how Apache and Tomcat 
interact?  I have the httpd.conf file for the Apache in question, can  
I  tell from that? 

    I have looked through the file and I do not see mod_jk being loaded 
so I think we can rule out that.

    I see the lines below in httpd.conf does this mean communication is  
via HTTPProxy? (our app is OBISDEV)
    ProxyPass /OBISBETA http://localhost:8082/OBISDEV
    ProxyPassReverse /OBISBETA localhost:8082/OBISDEV

    I'm sorry to be so clueless but I have absolutely no experience with 
Apache.

    Thanks again for trying to help,
    -=bill



Sander Temme wrote:
>
> On Jan 23, 2007, at 6:51 AM, Wm.A.Stafford wrote:
>
>> Since the application works normally on Tomcat only, it seems pretty
>> certain that Apache needs to be configured to handle Tomcat session
>> management either by cookies or url rewriting or both.
>
> You're probably losing the session cookie somehow, possibly through a 
> path or hostname mismatch.
>
>> Can someone describe what is going on and what needs to be done?
>
> May I ask how Apache and Tomcat interact? HTTP proxy, AJP proxy or 
> olde mod_jk?
>
> S.
>
> --sctemme@apache.org            http://www.temme.net/sander/
> PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF
>
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache + Tomcat = no session management

Posted by Sander Temme <sc...@apache.org>.
On Jan 23, 2007, at 6:51 AM, Wm.A.Stafford wrote:

> Since the application works normally on Tomcat only, it seems pretty
> certain that Apache needs to be configured to handle Tomcat session
> management either by cookies or url rewriting or both.

You're probably losing the session cookie somehow, possibly through a  
path or hostname mismatch.

> Can someone describe what is going on and what needs to be done?

May I ask how Apache and Tomcat interact? HTTP proxy, AJP proxy or  
olde mod_jk?

S.

-- 
sctemme@apache.org            http://www.temme.net/sander/
PGP FP: 51B4 8727 466A 0BC3 69F4  B7B8 B2BE BC40 1529 24AF