1 Reply Latest reply on Jan 3, 2013 10:48 AM by romanj

    Jboss 7.1 final and Session Cookie Path configuration

    lakeo

      We have come across an issue using Jboss 7 where we cannot get the reverse proxy set up to work using Apache in front and Jboss in the back to process the requests. Basically, the server is resetting the session every request, but only when accessed through the reverse proxy.  When accessing the app directly it works fine.

       

      In previous version of Jboss (6.1)  we had configured Context.xml file located under server\default\deploy\jbossweb.sar to use <SessionCookie path="/" /> tag. This allowed the request proxy set up to work correctly.

       

      But now with latest Jboss 7.1 version we cannot find anywhere how to configure this tag.

       

      Could you pls. point in the right direction on where to configure session cookie path parameter?

       

       

      Thanks!

        • 1. Re: Jboss 7.1 final and Session Cookie Path configuration
          romanj

          It can either be configured on apache or inside the project.

          There is to less details to personalize that set up for your system. But please look on ProxyPassReverseCookiePath and ProxyPassReverseCookieDomain - they should do the job If you would like to have that set up in Apache.

           

          <VirtualHost *:*>

          Servername example.com

            ProxyRequests Off

            ProxyPass / http://localhost:8080/example.com/

            ProxyPassReverseCookiePath /example.com /

            ProxyPassReverseCookieDomain localhost example.com

          </VirtualHost>

           

          If you prefere to tide up config inside the project you can specify cookie path in web.xml

          <session-config>

              <cookie-config>

                  <path>/</path>

              </cookie-config>

          </session-config>