WAS v8.5 > Reference > Administrator examples

Example: Configuring IBM HTTP server as an intermediary node for web services transactions

We can use an HTTP server intermediary nodes to enable the exchange of Web Services Atomic Transaction and Web Services Business Activity protocol messages across firewalls and outside the WebSphere Application Server domain. For IBM HTTP server, you achieve this behavior by modifying the plugin-cfg.xml file of the IBM HTTP server node.


Routing requests to WAS

We can use the IBM HTTP server as a single intermediary node, or we can combine it with a Proxy Server for IBM WAS. In both cases, update the plugin-cfg.xml file to indicate the HTTP server should route requests that are targeted at WAS, those of the form http://host:port/_IBMSYSAPP/*, to WAS, rather than processing them itself.

To update the plugin-cfg.xml file, add a URI element with a name of _IBMSYSAPP, as shown in the following example. Add this URI to all UriGroup elements in the plugin-cfg.xml file.

<UriGroup Name="default_host_server1_99T73NKNode01_Cluster_URIs"> <Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/snoop/*" /> 
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/hello" /> 
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/hitcount" /> 
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="*.jsp" /> 
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="*.jsv" /> 
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="*.jsw" /> 
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/j_security_check" /> 
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/ibm_security_logout" /> 
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/servlet/*" /> 
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/SamplesGallery/*" /> 
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/WSsamples/*" /> 
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/PlantsByWebSphere/*" /> 
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/PlantsByWebSphere/docs/*" /> <Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/_IBMSYSAPP/*" />
</UriGroup>


Configure virtual host mapping

If we are using IBM HTTP as the only intermediary node, in other words you are not also using Proxy Server for IBM WAS, configure virtual hosts to represent each WAS the HTTP node routes requests to. Update the plugin-cfg.xml file by adding VirtualHostGroup, VirtualHost and Route elements.

The following example shows part of the plugin-cfg.xml file for a configuration in which the IBM HTTP server routes requests to one of two servers, server1 and server2, in WAS.

The plugin-cfg.xml file contains two virtual host aliases, with names name1.acme.com and name2.acme.com, that are defined using VirtualHost and VirtualHostGroup elements. The Route elements define the association between the virtual hosts and the ServerCluster elements. When a request is made, IBM HTTP server finds the best matching route to dispatch the request to. A request made to virtual host name1.acme.com, with a URI that matches a pattern in the default_URIs URI group, is sent to the server1_Cluster server cluster. This server cluster contains only one server, server1, so requests targeted at virtual host name1.acme.com are sent to server1, and similarly, requests targeted at virtual host name2.acme.com are sent to server2.

<UriGroup Name="default_URIs"> <Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/snoop/*" /> 
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/hello" /> 
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/hitcount" /> 
...
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/PlantsByWebSphere/*" /> 
<Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/PlantsByWebSphere/docs/*" />   <Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/_IBMSYSAPP/*" /> </UriGroup> 
<ServerCluster CloneSeparatorChange="false" LoadBalance="Round Robin" Name="server1_Cluster" PostBufferSize="64" 
PostSizeLimit="-1" RemoveSpecialHeaders="true" RetryInterval="60">       <Server ConnectTimeout="0" ExtendedHandshake="false" MaxConnections="-1" Name="server1" ServerIOTimeout="0" WaitForContinue="false">          ...
      </Server>       <PrimaryServers> <Server Name="server1"/> </PrimaryServers>    </ServerCluster> <ServerCluster CloneSeparatorChange="false" LoadBalance="Round Robin" Name="server2_Cluster" PostBufferSize="64" PostSizeLimit="-1"
 RemoveSpecialHeaders="true" RetryInterval="60">       <Server ConnectTimeout="0" ExtendedHandshake="false" MaxConnections="-1" Name="server2" ServerIOTimeout="0" WaitForContinue="false">          ...
     </Server>       <PrimaryServers> <Server Name="server2"/>  </PrimaryServers> </ServerCluster> <VirtualHostGroup Name="vhost_server1"> <VirtualHost Name="name1.acme.com:9081"/> </VirtualHostGroup> <VirtualHostGroup Name="vhost_server2"> <VirtualHost Name="name2.acme.com:9081"/> </VirtualHostGroup> <Route ServerCluster="server1_Cluster" UriGroup="default_URIs" VirtualHostGroup=" vhost_server1 "/> <Route ServerCluster="server2_Cluster" UriGroup="default_URIs" VirtualHostGroup=" vhost_server2"/>


Related concepts:

Web services transactions, high availability, firewalls and intermediary nodes


+

Search Tips   |   Advanced Search