Eclipse or SUNrise...

Eclipse or SUNrise...
...JAVA for sure

Friday, November 26, 2010

Configuration of WebSphere Application Server and IBM HTTP Server Plugin

Several times I came across problematic configuration of IBM HTTP Server with WebSphere Application Server. Most of the times it works out of the box, but sometimes, especially when these components are installed separately or works in different versions it somehow brings trouble. I guess the configuration propagation isn't perfect for these components.

The standard way to create a IHS instance with WAS console, mapping each modules of applications and then propagating WAS Plugin works fine, but although that it turns out that IHS won't redirect you to the apps. Standard error for this is (in this example the request was made for snoop servlet - a sample application which is bundled with WAS):

[error] [client 9.x.x.x] File does not exist: /opt/IBM/HTTPServer/htdocs/snoop


To resolve this problem you can simply add this lines to the httpd.conf file:

LoadModule was_ap22_module /opt/IBM/HTTPServer/Plugins/bin/mod_was_ap22_http.so

WebSpherePluginConfig /opt/IBM/HTTPServer/Plugins/config/webserver1/plugin-cfg.xml


where the was_ap22_module varies from your IHS and WAS version (IHS 7.0 for example is build upon Apache 2.2 so it uses was_ap22_module, older IHS built upon Apache 2.0 would use was_ap20_module). The second line loads the plugin-cfg.xml file which is propagated from WAS (is copied to IHS location to be strict).

Another common problem with IHS is that, WAS by default is configured to map its application on port 80 (the virtual host mapping * is set to 80). If the IHS will use different port then 80, be sure to correct this in the WAS.

No comments: