Replacing the WebSphere Apache Plugin with iRules
Published Jul 29, 2008
Version 1.0Was this article helpful?
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.