5.2.  Configure an HTTP server and WebSphere Application Server plug-in.

[Note]

Adding a web server

If the node for the web server has been defined, you can add the web server definition. To add a web server definition, complete the following steps:

  1. Click Servers > Server Types > Web servers

    Figure 5.1. Web servers

    Web servers


  2. Click New...

  3. Select the node and enter the web server name. Using the drop-down menu, select the web server type. Click Next.

    Figure 5.2. Select the node and enter the web server name

    Select the node and enter the web server name


  4. Select a template. Initially, this template will be the one supplied with WebSphere that is specific to the web server type. After you have defined a web server, you can make it a template for future use.

    Figure 5.3. Select a Web server template

    Select a Web server template


    Click Next.

  5. Enter the properties for the web server.

    Figure 5.4. Defining a web server properties

    Defining a web server properties


  6. Review the options and click Finish

    Figure 5.5. Confirm new Web server

    Confirm new Web server


    Save configuration and start the server.

    Figure 5.6. Web servers

    Web servers


Working with the plug-in configuration file

The plug-in configuration file (plugin-cfg.xml) contains routing information for all applications mapped to the web server. This file is read by a binary plug-in module loaded in the web server. An example of a binary plug-in module is the /opt/IBM/WebSphere/Plugins/bin/64bits/mod_was_ap22_http.so file for IBM HTTP Server on the Linux platform.

The binary plug-in module does not change. However, the plug-in configuration file for the binary module needs to be regenerated and propagated to the web server whenever a change is made to the configuration of applications mapped to the web server. The binary module reads the XML file to adjust settings and to locate deployed applications for the web server.

Generated plug-in configuration file:


test317:/opt/IBM/HTTPServer/conf # cat /opt/IBM/HTTPServer/Plugins/config/webserver1/plugin-cfg.xml

<?xml version="1.0" encoding="ISO-8859-1"?>
<!--HTTP server plugin config file for the webserver test317Cell01.exampleNode01.webserver1 generated on 2013.06.01 at 05:11:30 PM EDT-->
<Config ASDisableNagle="false" AcceptAllContent="true" AppServerPortPreference="HostHeader" ChunkedResponse="false" FIPSEnable="false"
		FailoverToNext="false" HTTPMaxHeaders="300" IISDisableNagle="false" IISPluginPriority="High" IgnoreDNSFailures="false"
		MarkBusyDown="false" OS400ConvertQueryStringToJobCCSID="false" RefreshInterval="60" ResponseChunkSize="64" SSLConsolidate="true"
		TrustedProxyEnable="false" VHostMatchingCompat="false">

   <Log LogLevel="Error" Name="/opt/IBM/HTTPServer/Plugins/logs/webserver1/http_plugin.log"/>
   <Property Name="ESIEnable" Value="true"/>
   <Property Name="ESIMaxCacheSize" Value="1024"/>
   <Property Name="ESIInvalidationMonitor" Value="false"/>
   <Property Name="ESIEnableToPassCookies" Value="false"/>
   <Property Name="ESICacheidFull" Value="false"/>
   <Property Name="PluginInstallRoot" Value="/opt/IBM/HTTPServer/Plugins/"/>
   <RequestMetrics armEnabled="false" loggingEnabled="false" rmEnabled="false" traceLevel="HOPS">
      <filters enable="false" type="URI">
         <filterValues enable="false" value="/snoop"/>
         <filterValues enable="false" value="/hitcount"/>
      </filters>
      <filters enable="false" type="SOURCE_IP">
         <filterValues enable="false" value="255.255.255.255"/>
         <filterValues enable="false" value="254.254.254.254"/>
      </filters>
      <filters enable="false" type="JMS">
         <filterValues enable="false" value="destination=aaa"/>
      </filters>
      <filters enable="false" type="WEB_SERVICES">
         <filterValues enable="false" value="wsdlPort=aaa:op=bbb:nameSpace=ccc"/>
      </filters>
   </RequestMetrics>
</Config>

					

Regenerating the plug-in configuration file

The plug-in configuration file needs to be regenerated and propagated to the web servers when there are changes to your WebSphere configuration that affect how requests are routed from the web server to the application server. These changes include:

The plug-in file can be regenerated manually using the administration tools. You can also set up the plug-in properties of the web server to enable automatic generation of the file whenever a relevant configuration change is made.

To regenerate the plug-in configuration manually, you can either use the administrative console, or you can issue the GetPluginCfg command.

Generating the plug-in with administrative console

To generate or regenerate the plug-in configuration file, complete the following steps:

To use the new plugin-cfg.xml file, you must propagate it to the web server system.

Regenerating the plug-in with the GenPluginCfg command

The GenPluginCfg.sh command is used to regenerate the plug-in configuration file.

You can use the -profileName option to define the profile of the Application Server process in a multi-profile installation. The -profileName option is not required for running in a single profile environment. The default for this option is the default profile. For a distributed server environment, the default profile is the deployment manager profile.

The GenPluginCfg.sh command reads the contents of the configuration repository on the local node to generate the Web server plug-in configuration file.

Examples:

To generate a plug-in configuration for all of the clusters in a cell:

GenPluginCfg.sh -cell.name NetworkDeploymentCell
					

To generate a plug-in configuration for a single server:

GenPluginCfg.sh -cell.name BaseApplicationServerCell -node.name appServerNode -server.name appServerName
					

To generate a plug-in configuration file for a web server:

GenPluginCfg.sh -cell.name BaseApplicationServerCell -node.name webserverNode -webserver.name webserverName
					

test317:/opt/IBM/WebSphere/AppServer/bin # ./GenPluginCfg.sh -profileName AppSrv01 -webserver.name webserver1

IBM WebSphere Application Server, Release 8.0
WebSphere Plugin Configuration Generator
Copyright IBM Corp., 1997-2008
PLGC0005I: Plug-in configuration file = /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/config/cells/test317Cell01/nodes/exampleNode01/servers/webserver1/plugin-cfg.xml
PLGC0052I: Plug-in configuration file generation is complete for the Web server. test317Cell01.exampleNode01.webserver1.
					


test317:/opt/IBM/WebSphere/AppServer/bin # cat /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/config/cells/test317Cell01/nodes/exampleNode01/servers/webserver1/plugin-cfg.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--HTTP server plugin config file for the webserver test317Cell01.exampleNode01.webserver1 generated on 2013.06.02 at 05:39:06 PM EDT-->
<Config ASDisableNagle="false" AcceptAllContent="true" AppServerPortPreference="HostHeader" ChunkedResponse="false" FIPSEnable="false"
		FailoverToNext="false" HTTPMaxHeaders="300" IISDisableNagle="false" IISPluginPriority="High" IgnoreDNSFailures="false" MarkBusyDown="false"
		OS400ConvertQueryStringToJobCCSID="false" RefreshInterval="60" ResponseChunkSize="64" SSLConsolidate="true" TrustedProxyEnable="false"
		VHostMatchingCompat="false">

   <Log LogLevel="Error" Name="/opt/IBM/HTTPServer/Plugins/logs/webserver1/http_plugin.log"/>
   <Property Name="ESIEnable" Value="true"/>
   <Property Name="ESIMaxCacheSize" Value="1024"/>
   <Property Name="ESIInvalidationMonitor" Value="false"/>
   <Property Name="ESIEnableToPassCookies" Value="false"/>
   <Property Name="ESICacheidFull" Value="false"/>
   <Property Name="PluginInstallRoot" Value="/opt/IBM/HTTPServer/Plugins/"/>
   <VirtualHostGroup Name="default_host">
      <VirtualHost Name="*:9080"/>
      <VirtualHost Name="*:80"/>
      <VirtualHost Name="*:9443"/>
      <VirtualHost Name="*:5060"/>
      <VirtualHost Name="*:5061"/>
      <VirtualHost Name="*:443"/>
   </VirtualHostGroup>
   <ServerCluster CloneSeparatorChange="false" GetDWLMTable="false" IgnoreAffinityRequests="true" LoadBalance="Round Robin"
   		Name="server1_exampleNode01_Cluster" PostBufferSize="64" PostSizeLimit="-1" RemoveSpecialHeaders="true" RetryInterval="60">
      <Server ConnectTimeout="0" ExtendedHandshake="false" MaxConnections="-1" Name="exampleNode01_server1" ServerIOTimeout="900" WaitForContinue="false">
         <Transport Hostname="test317.java.boot.by" Port="9080" Protocol="http"/>
         <Transport Hostname="test317.java.boot.by" Port="9443" Protocol="https">
            <Property Name="keyring" Value="/opt/IBM/HTTPServer/Plugins/config/webserver1/plugin-key.kdb"/>
            <Property Name="stashfile" Value="/opt/IBM/HTTPServer/Plugins/config/webserver1/plugin-key.sth"/>
         </Transport>
      </Server>
   </ServerCluster>
   <UriGroup Name="default_host_server1_exampleNode01_Cluster_URIs">
      <Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/PlantsByWebSphere/*"/>
      <Uri AffinityCookie="JSESSIONID" AffinityURLIdentifier="jsessionid" Name="/PlantsByWebSphere/docs/*"/>
   </UriGroup>
   <Route ServerCluster="server1_exampleNode01_Cluster" UriGroup="default_host_server1_exampleNode01_Cluster_URIs" VirtualHostGroup="default_host"/>
   <RequestMetrics armEnabled="false" loggingEnabled="false" rmEnabled="false" traceLevel="HOPS">
      <filters enable="false" type="URI">
         <filterValues enable="false" value="/snoop"/>
         <filterValues enable="false" value="/hitcount"/>
      </filters>
      <filters enable="false" type="SOURCE_IP">
         <filterValues enable="false" value="255.255.255.255"/>
         <filterValues enable="false" value="254.254.254.254"/>
      </filters>
      <filters enable="false" type="JMS">
         <filterValues enable="false" value="destination=aaa"/>
      </filters>
      <filters enable="false" type="WEB_SERVICES">
         <filterValues enable="false" value="wsdlPort=aaa:op=bbb:nameSpace=ccc"/>
      </filters>
   </RequestMetrics>
</Config>

					

Web server configuration using WebSphere Customization Toolbox (WCT)

After installing the web server plug-in, you need to configure it. A new tool in WebSphere Application Server V8 is the Web Server Plug-in Configuration Tool in the [Standalone] WebSphere Customization Toolbox, which is used for configuring web server plug-ins. The Web Server Plug-in Configuration Tool creates one or more configurations for the web server plug-ins that can direct requests from a web client through the web server, and then interact with applications running on an application server. The Web Server Plug-in Configuration Tool edits the configuration file or files for a web server by creating directives that point to the location of the binary plug-in module and the plug-in configuration file.

Figure 5.11. Plug-in properties

Plug-in properties


Before configuring the plug-in, you need to determine the topology setup. The options for defining and managing web servers depend on your chosen web server topology and your WebSphere Application Server package. Decisions to make include whether to collocate the web server with other WebSphere Application Server processes, and whether to make the web server managed or unmanaged.

Professional hosting         Free 'Oracle Certified Expert Web Services Developer 6' Guide     Free SCDJWS 5.0 Guide