Tuesday, February 23, 2010

Integrating Apache 2.x with IBM Web sphere 5.1 x and above

Integrating Apache 2.x with IBM Web sphere 5.1 x and above



1. Download the Web server plugins for Websphere 5.x from

http://www-1.ibm.com/support/docview.wss?uid=swg24007227 for (5.1x)

http://www-1.ibm.com/support/docview.wss?uid=swg24007265 for (5.0x)


2. Get the file mod_was_ap20_http.dll from the plugin and copy it in


Apache modules directory i.e <APACHE_HOME>/modules directory.


3. Get the plugin-cfg.xml (from Websphere) file

This can be got by

1. Running the command GenPluginCfg in the

<WAS_ROOT>\bin directory (GenPluginCfg.bat)

(where WAS_ROOT is the Websphere Application Server installation directory)


The Plugin-cfg.xml file will be created in the location


<WAS_ROOT>\config\cells\plugin-cfg.xml


2. Running Websphere admin console and exporting the plugin.

Login to the admin console (at port 9090 i.e 127.0.0.1:9090) (This doesn’t require a user ID or a password)

Goto Environment -> Update Web Server Plugin

Click OK to update the plugin configuration file.


The Plugin-cfg.xml file will be created in the location below


<WAS_ROOT>\config\cells\plugin-cfg.xml


4. Copy the plugin-cfg.xml file in Apache modules directory

i.e <APACHE_HOME>/modules directory.

5. Add these lines in the httpd.conf file in the <APACHE_HOME>/conf directory.

LoadModule was_ap20_module modules/mod_was_ap20_http.dll

WebSpherePluginConfig modules/plugin-cfg.xml


6. You can change the location of the log file generated by the plugin by editing the plugin-cfg.xml file. For example, if the Plugin

error log is to be generated in the apache logs directory, the plugin-cfg.xml file can be edited as follows.

<Log LogLevel="Error" Name= "<APACHE_HOME>\logs\http_plugin.log"/>


A simplified form of the plugin-cfg.xml file is shown below.


<Config>

<Log LogLevel="Error" Name="<APACHE_HOME>\logs\http_plugin.log"/>


<VirtualHostGroup Name="default_host">

<VirtualHost Name="*:80"/>

</VirtualHostGroup>



<ServerCluster Name="MyCluster">

<Server Name="server1">

<Transport Hostname="Server-host" Port="9080" Protocol="http"/>

</Server>

</ServerCluster>



<UriGroup Name="MyURIs">

<Uri Name="/snoop/*"/>

<Uri Name="/*"/>

</UriGroup>



<Route ServerCluster="MyCluster" UriGroup="MyURIs" VirtualHostGroup="default_host"/>

</Config>



7.Now restart Websphere and Apache server and type



http://127.0.0.1/snoop and you can see the Websphere's snoop servlet in the browser.

##########################################################################

No comments:

Post a Comment