Replacing the WebSphere Apache Plugin with iRules
Problem Definition
"We’re having a bit of difficulty configuring the LTM to handle all the redirects that this WebSphere application does. We’ve tried streaming profiles and iRules, but every meth...
Published Jul 29, 2008
Version 1.0Deb_Allen_18
Historic F5 Account
Joined September 25, 2004
Deb_Allen_18
Historic F5 Account
Joined September 25, 2004
Simon_83666
Aug 07, 2008Nimbostratus
I'm a WebSphere admin and I've been experimenting with replacing the WAS plugin with some config on LTM. I also noticed the following issues:
1) for WebSphere V6, if you only intend to use port 80 on the Virtual you would need an iRule similar to the following to stop the client request being redirected to the Websphere port - 908x , otherwise, a virtual with the corresponding 908x port would need to be created and that doesn't look very nice on the client's browser.
when HTTP_RESPONSE {
if { [HTTP::is_redirect] } {
log local0. "Request redirected. Original value: [HTTP::header value Location], updated value: [string map -nocase {9081 80 9082 80} [HTTP::header value Location]]"
Do the update, replacing port 9080 with 80
HTTP::header replace Location [string map -nocase {9081 80 9082 80} [HTTP::header value Location]]
}
}
2) For WebSpehre V5, one would need to add additional virtual host alias on the Websphere setup so it accepts traffic on the 908x port with the real IP of the WebSphere server. I also had to add a stream profile to correct any reference to the 908x port on the HTTP response ( the above rule for V6 redirect does not work). I'm not sure whether this is application specific problem or an issue across all Websphere V5 installation.