Plug-ins configuration

The Web Server Plug-ins Configuration Tool configures an application server for a web server type and creates a web server definition in the configuration of the application server. Become familiar with the different processing paths that the Web Server Plug-ins Configuration Tool can use.

This article describes the three ways that the Web Server Plug-ins Configuration Tool can configure a web server and create the plugin-cfg.xml file, which is the plug-in configuration file.

Alternatively to using the Web Server Plug-ins Configuration Tool, we can use the pct command-line tool with a response file to configure a web server.

Before beginning: The plug-ins and web-server configuration files are updated during plug-ins configuration. For the Web Server Plug-ins Configuration Tool or the pct command-line tool as a non-root user, verify that you have appropriate privileges to update the configuration files for the Web Server Plug-ins as well as the configuration files for the web server (such as IHS) before starting a configurationespecially if you are not our owner of these files. : When using the Web Server Plug-ins Configuration Tool to configure the IBM HTTP Server Administration Server, the Websphere Customization Toolbox must be run as a "local" account with administrator/root privileges.

In addition, the default httpd.conf configuration file must stay within the <IHS_HOME>/conf directory, and you must run setupadm manually after the administration configuration.

Supported configurations: The Web Server Plug-ins Configuration Tool is intended for use with the full WebSphere Application Server profile; it is not required or supported for use in generating a web server plug-in for the Liberty profile. For information on generating a web server plug-in for the Liberty profile, read Configure the Liberty profile with a web server plug-in.


Configuration flows for the Network Deployment product

The Web Server Plug-ins Configuration Tool resolves all configurations of a web server and WebSphere Application Server to three scenarios: a remote application server, local distributed application server, and local standalone application server. The logic implemented in determining which scenario applies to a configuration is shown in the following diagram.

Legend:

Installation type?

The installation type is either remote or local.

When the Web server and application server are not on the same computer, choose the remote scenario. When both the web server and application server are on the same computer, choose the local scenario.

Profile?

If the product is installed but the Profile Management Tool has not yet created a profile, the scenario is considered to be a remote installation.

Standalone application server with web server definition?

If the profile is an application server with an existing web server definition, the installation is considered a remote installation.

Profile_type?

The Web Server Plug-ins Configuration Tool can configure only one profile at a time. These three paths show how processing varies for different types of profiles.

Federated?

If the application server node is federated, the Web Server Plug-ins Configuration Tool configures the web server definition on the managed node. This has advantages. Suppose the web server and the managed node are on a separate machine. The plugin-cfg.xml is automatically propagated to the remote node during node synchronization because the web server definition is part of the node configuration.

Distributed profile?

If the deployment manager has a federated custom node (custom profile), the Web Server Plug-ins Configuration Tool configures the web server definition on the managed node. This has advantages. Suppose the web server and the managed node are on a separate machine. The plugin-cfg.xml is automatically propagated to the remote node during node synchronization because the web server definition is part of the node configuration.

The Web Server Plug-ins Configuration Tool creates a web server definition within the application server profile.

The Web Server Plug-ins Configuration Tool configures the web server to use the plugin-cfg.xml that is within the application server profile. The standalone application server regenerates the profile_root/config/cells/cell_name/nodes/web_server_name_node/servers/web_server_name/plugin-cfg.xml file whenever a change occurs in the application server configuration that affects deployed applications.

After installing the binary plug-in for the local web server, we can start the application server and the web server immediately upon completion of the installation.

Suppose that you create a web server definition on a standalone application server and then federate the node. The web server definition is not federated into the cell because the web server definition is defined as a separate node in a standalone application server. We must recreate the web server definition on the managed node. See Scenario 2.

Profile type Federation status Automatic creation of web server definition? Web server already defined in application server configuration?
Application server Not federated Yes No

An unfederated standalone application server that has an existing web server definition should be processed as a remote plug-in configuration.

An existing web server definition on a standalone application server requires that the Web Server Plug-ins Configuration Tool follow the remote installation path. A standalone application server can have just one web server definition.

See Scenario 3 for a description of this type of node.

A federated standalone application server should be processed as a local distributed plug-in configuration. See Scenario 2 for a description of this type of node.

The following overview shows the procedure for verifying the web server configuration:

  1. Start the web server with the proper procedure for the web server.

    For example, start the IBM HTTP Server from a command line:

    • ./IHS_root/bin/apachectl start

    • IHS_root\bin\apache

  2. Start the application server.

    Change directories to the profile_root/bin directory and run the startServer command:

    • ./profile_root/bin/startServer.sh server1

    • profile_root\bin\startServer server1

    Open the console and save the changed configuration.

  3. Point the browser to http://localhost:9080/snoop to test the internal HTTP transport provided by the application server. Point the browser to http://Host_name_of_Web_server_machine/snoop to test the web server plug-in.

  4. Verify that both web addresses display the Snoop Servlet - Request/Client Information page.

The Web Server Plug-ins Configuration Tool does not automatically create a web server definition within a federated application server profile. The tool creates the configureweb_server_name script instead in the plugins_root/bin directory.

The Web Server Plug-ins Configuration Tool configures the web server to use the plugin-cfg.xml that will be created within the application server profile when you run the script. The deployment manager regenerates the plugin-cfg.xml in the profile_root/config/cells/cell_name/nodes/node/servers/web_server_name directory. Regeneration occurs whenever a change occurs in the application server configuration that affects deployed applications on the managed node.

After installing the binary plug-in for the local web server, you must run the script before we can start the web server. The web server has already been configured to use the plugin-cfg.xml in the application server configuration. That file does not exist until you run the configureweb_server_name script.

Profile type Federation status Creation of web server definition? Web server already defined in application server configuration?
Application server profile Federated By script N/A
Custom profile Not federated By script N/A
Custom profile Federated By script N/A
dmgr profile with a managed node (distributed profile) N/A By script N/A

The following overview shows the procedure for completing the configuration and verifying the web server configuration:

  1. Start the deployment manager.

  2. If we are planning to add an application server node into a deployment manager cell but have not done so yet, federate the node before installing the plug-ins. If the web server definition exists when you federate the node, the web server definition is lost when you federate.

  3. Create the web server definition in the application server. You have two options:

    • Use the console of the deployment manager to create a web server definition for a managed node. Click Servers > Web servers > New and use the Create new web server entry wizard to create the web server definition.

    • Run the script to manually create the web server definition within the configuration of the deployment manager. Run the script from the plugins_root/bin directory. The script can address the deployment manager on the same machine.

      Open a command window to run the appropriate script:

      • ./configureweb_server_name.sh

      • configureweb_server_name.bat

      The webserverNodeName value in the script is a concatenation of the nick name you have chosen for the web server and the suffix -node. It is automatically created during plug-in installation and cannot be changed. For example, if you named the web server myserver during plug-in installation, the value for the associated web server definition created after you ran the script would be myserver-node.

      If we have enabled security or changed the default JMX connector type, edit the script and include the appropriate parameters.

  4. Start the web server with the proper procedure for the web server.

    For example, start the IBM HTTP Server from a command line:

    • ./IHS_root/bin/apachectl start

    • IHS_root\bin\apache

  5. Start the application server.

    Change directories to the profile_root/bin directory and run the startServer command:

    • ./profile_root/bin/startServer.sh server1

    • profile_root\bin\startServer server1

  6. Open the console of the deployment manager. Wait for node synchronization to occur and save the changed configuration that includes the new web server definition.

  7. Point the browser to http://localhost:9080/snoop to test the internal HTTP transport provided by the application server. Point the browser to http://Host_name_of_Web_server_machine/snoop to test the web server plug-in.

  8. Verify that both web addresses display the Snoop Servlet - Request/Client Information page.

The Web Server Plug-ins Configuration Tool does not automatically create a web server definition within the distributed profile on a remote machine. The tool creates the configureweb_server_name script instead.

The Web Server Plug-ins Configuration Tool configures the web server to use the plugin-cfg.xml that will be maintained on the web server machine in the plugins_root/config/web_server_name directory. This file requires periodic propagation. Propagation is copying the current plugin-cfg.xml from the application server machine to replace the plugins_root/config/web_server_name/plugin-cfg.xml file.

After installing the binary plug-in for the local web server, we do not have to run the script before we can start the application server and the web server. However, we do not have the benefits of a Web server definition in the application server node until you run the script.

Profile type Federation status Creation of web server definition? Web server already defined in application server configuration?
Any profile anywhere if you select a remote installation type in the Web Server Plug-ins Configuration Tool N/A By script N/A
No profile N/A By script N/A
Unfederated standalone application server profile with an existing web server definition Not federated By script Yes
dmgr profile with no managed nodes N/A By script N/A

The following overview shows the procedure for verifying the temporary plugins_root/config/web_server_name/plugin-cfg.xml file.

The web server communicates with the remote application server using the temporary plugin-cfg.xml.

If the application server has an HTTP Transport port assignment other than 9080, the test is not successful. Continue to the next section to create the web server definition on the application server and complete your test of the configuration.

  1. Start the web server with the proper procedure for the web server.

    For example, start the IBM HTTP Server from a command line:

    • ./IHS_root/bin/apachectl start

    • IHS_root\bin\apache

  2. Start the application server on the remote machine.

    Change directories to the profile_root/bin directory and run the startServer command:

    • ./profile_root/bin/startServer.sh server1

    • profile_root\bin\startServer server1

  3. Point the browser to http://localhost:9080/snoop to test the internal HTTP transport provided by the application server. Point the browser to http://Host_name_of_Web_server_machine/snoop to test the web server plug-in.

  4. Verify that both web addresses display the Snoop Servlet - Request/Client Information page.

The following overview shows the procedure for completing the configuration. The configuration is not complete until the Web server definition exists in the configuration of the application server node. The web server definition is a central element in the regeneration of a valid plug-in configuration file, plugin-cfg.xml.

  1. Start the deployment manager if you are configuring the deployment manager or a managed node.

  2. Federate a remote application server node or custom node now if you are planning to federate the node at some point. If a web server definition already exists when you federate a node, the definition is lost.

  3. Create the web server definition in the application server. You have two options for a managed node. Use the script option for a deployment manager node without managed nodes.

    • Use the console of the deployment manager to create a web server definition for a managed node. Click Servers > Web servers > New and use the Create new web server entry wizard to create the web server definition.

    • Run the script to manually create the web server definition within the configuration of the application server node:

      1. Copy the script from the plugins_root/bin directory to the remote app_server_root/bin directory.

      2. Open a command window and run the script:

        • ./configureweb_server_name.sh

        • configureweb_server_name.bat

      The webserverNodeName value in the script is a concatenation of the nick name you have chosen for the web server and the suffix -node. It is automatically created during plug-in installation and cannot be changed. For example, if you named the web server myserver during plug-in installation, the value for the associated web server definition created after you ran the script would be myserver-node.

      If we have enabled security or changed the default JMX connector type, edit the script and include the appropriate parameters.

  4. Open the console of the deployment manager if the node is federated. Wait for node synchronization to occur on the managed node, and save the changed configuration that includes the new Web server definition. If the remote node is not federated, open the console of the application server and save the changed configuration.

  5. Copy the current plug-in configuration file, plugin-cfg.xml, in the profile_root/config/cells/cell_name/nodes/web_server_name_node/servers/web_server_name directory. Paste the file on the web server machine to replace the temporary plugins_root/config/web_server_name/plugin-cfg.xml file. The IBM HTTP Server supports automatic propagation. Other web servers require manual propagation.

  6. Start the web server with the proper procedure for the web server.

  7. Point the browser to http://localhost:9080/snoop to test the internal HTTP transport provided by the application server. Point the browser to http://Host_name_of_Web_server_machine/snoop to test the web server plug-in.

  8. Verify that both web addresses display the Snoop Servlet - Request/Client Information page.

To summarize, three scenarios exist for Web Server Plug-ins. Each scenario revolves around a unique location for the plug-in configuration file, plugin-cfg.xml. The application server generates the plug-in configuration file. The purpose of the file is to publish the location of all of the application server elements that are relevant to a web server. Such elements include applications, virtual hosts for serving applications, clusters, and cluster members for example.

If the web server cannot get to the file on the application server machine, you must take the file to the web server. That process is called propagation. Propagation is reserved for the remote plug-in configuration scenario, which is Scenario 3 in this article.

In each of the local scenarios, the Web server can get to the plugin-cfg.xml because it is on the same machine as the file. Two local scenarios exist because of two distinct locations for a local plugin-cfg.xml.

The configuration scheme for WebSphere Application Server puts the plug-in configuration file in a web server definition that is either within a web server node or a managed node. The type of node is the difference between Scenario 2 and Scenario 1 in this article. All Scenario 2 configurations require the web server definition to exist within a managed application server node. All Scenario 1 configurations have the web server definition within its own web server node.

Limited management options do not let you create or delete the one web server definition in the console of a standalone application server. The inability of a standalone application server to create a web server definition is the basis for the configuration scripts created by the Web Server Plug-ins Configuration Tool. Without the scripts you could not easily create a web server definition on a standalone application server node.

The location of the plugin-cfg.xml for each configuration described in this article is shown in the following table:

file locations. This table describes the plug-in configuration
Scenario Profile type Location of the plugin-cfg.xml
plugins_root profile_root: within the managed node profile_root: within the web server node
1 Application server profile

X
2 Application server profile
X
Custom profile
X
dmgr profile with a managed node (distributed profile)
X
3 Any profile anywhere if you select a remote installation type in the Web Server Plug-ins Configuration Tool X

No profile X

Unfederated (standalone) application server profile with an existing web server definition X

dmgr profile with no managed nodes X

Legend:

plugins_root

plugins_root

    /config/web_server_name/plugin-cfg.xml

profile_root: within the managed node

    profile_root/config/cells/cell_name/nodes/node_of_AppServer/servers/web_server_name/plugin-cfg.xml

profile_root: within the web server node

    profile_root/config/cells/cell_name/nodes/web_server_name_node/servers/web_server_name/plugin-cfg.xml


Related concepts

Web server configuration


Related tasks

Configure a web server plug-in using the pct tool