It is very common to put a WebLogic Portal cluster behind a web server or load balancer. Most implementations I have seen to date either use an F5, Apache Web Server, or a combination of the two to serve up the portal content. If you are also trying to access the Portal Admin Console through the web server you most likely experienced some sort of session affinity issue. I realize most IT shops will just access the Portal Admin Console through a specific combination of managed host and port. However, if you have any desire to access the Portal Admin Console through a web server or load balancer (especially for CMS functions or just a friendly url), here is why the session affinity issue is presenting itself.
The Portal Admin Console was developed to use a non standard Cookie Name. By default, weblogic applications will use the
JSESSIONID Cookie Name to maintain the user session. However, the WebLogic Portal Admin Console uses a different Cookie Name to maintain the user session. It overrides the default behavior and uses the key
JSESSIONID_ADMINTOOLS. Therefore, you need to make a change to your web server to maintain session affinity. For this post, I will present the changes required for Apache Web Server.
A second location match or resource match needs to be setup in the Apache Web Server config to route Admin specific requests to a different setup. We made sure all of our Portal Admin Consoles ended in "Admin" to keep this configuration simple. In the example below, we take any request coming in that looks like *Admin/ and have it override the Cookie Name. Now the web server will use
JSESSIONID_ADMINTOOLS to create a cookie and maintain a session id with the application server. The weblogic proxy plugin supports this configuration parameter out of the box.
LocationMatch "/*Admin/"> SetHandler weblogic-handler IfModule mod_weblogic.c> WebLogicCluster x.x.x.x:x, x.x.x.x:x WLCookieName JSESSIONID_ADMINTOOLS IfModule> LocationMatch>
In summary, accessing the WebLogic Portal Admin Console through a web server requires a change to override the cookie used for requests going to the console address. This should resolve any session affinity issues experienced in your environment.