[IBM i][AIX Solaris HP-UX Linux Windows]

Web server configuration

Plug-in configuration involves configuring the web server to use the binary plug-in module that WebSphere® Application Server provides. Plug-in configuration also includes updating the plug-in XML configuration file to reflect the current application server configuration. The binary module uses the XML file to help route web client requests.

[AIX Solaris HP-UX Linux Windows]After installing a supported web server, you must install a binary plug-in module for the web server by installing the Web Server Plug-ins. The plug-in module lets the web server communicate with the application server. The Web Server Plug-ins Configuration Tool allows you to configure the web server and create a web server definition in the configuration of the application server. The Web Server Plug-ins Configuration Tool uses the following files to configure a plug-in for the web server that you select:
  • The web server configuration file on the web server machine, such as the httpd.conf file for IBM® HTTP Server.
  • The binary web server plug-in file on the web server machine.
  • The plug-in configuration file, plugin-cfg.xml, on the application server machine that you propagate (copy) to a Web server machine.
  • The default (temporary) plug-in configuration file, plugin-cfg.xml, on the web server machine.
  • The configureweb_server_name script that you copy from the web server machine to the application server machine.
[IBM i]The plug-ins configuration process uses the following files to configure a plug-in for the web server that you select:
  • The web server configuration file on the web server machine, such as the httpd.conf file for IBM HTTP Server.
  • The binary web server plug-in file on the web server machine.
  • The plug-in configuration file, plugin-cfg.xml, on the application server machine that you propagate (copy) to a Web server machine.
  • The configuration script for configuring the web server definition for your application server in a remote HTTP scenario.

See the following descriptions of each file.

Web server configuration file

The web server configuration file is installed as part of the web server.

[AIX Solaris HP-UX Linux Windows]The Web Server Plug-ins Configuration Tool must re-configure the configuration file for a supported web server.

Configuration consists of adding directives that identify file locations of two files:
  • Binary web server plug-in file
  • Plug-in configuration file, plugin-cfg.xml

Binary web server plug-in file

An example of a binary plug-in module is the mod_was_ap22_http.dll file for IBM HTTP Server on the Windows platform.

[IBM i]Another example of a binary plug-in module is the QSVTAP20 service program on the IBM i platform.

The binary plug-in file does not change. However, the configuration file for the binary plug-in is an XML file. The application server changes the configuration file when certain changes to your WebSphere Application Server configuration occur.

The binary module reads the XML file to adjust settings and to route requests to the application server.

Plug-in configuration file, plugin-cfg.xml

The plug-in configuration file is an XML file with settings that you can tune in the administrative console. The file lists all of the applications installed on the web server definition. The binary module reads the XML file to adjust settings and to route requests to the application server.

[AIX Solaris HP-UX Linux Windows]The standalone application server regenerates the plugin-cfg.xml file in the profile_root/config/cells/cell_name/nodes/web_server_name_node/servers/web_server_name directory. Regeneration occurs whenever a change occurs in the application server configuration that affects deployed applications.

[IBM i]When you make application server configuration changes that affect deployed applications, regenerate the plug-in configuration XML file.

After regeneration, propagate (copy) the file to the web server machine. The binary plug-in then has access to the most current copy of its configuration file.

[AIX Solaris HP-UX Linux Windows]The web server plug-in configuration service automatically regenerates the plugin-cfg.xml file after certain events that change the configuration. The configuration service automatically propagates the plugin-cfg.xml file to an IBM HTTP Server machine when the file is regenerated. You must manually copy the file on other web servers.

[IBM i]On IBM i systems, the plug-in is not automatically generated. You must regenerate and propagate the file manually.

[AIX Solaris HP-UX Linux Windows]

Default plug-in configuration file, plugin-cfg.xml

The Web Server Plug-ins Configuration Tool creates the temporary plugin-cfg.xml file in the plugins_root/config/web_server_name directory. The tool creates the file for every remote installation scenario.

The default file is a placeholder that you must replace with the plugin-cfg.xml file from the web server definition on the application server. The default file is a replica of the file that the application server creates for a default standalone application server.

Run the configureweb_server_name script from the app_server_root/bin directory of the application server machine for a remote installation or directly from the plugins_root/bin directory for a local installation. The script creates the web server definition in the configuration files of the default profile. To configure a different profile than the default, edit the configureweb_server_name script. Use the -profileName parameter to identify a profile other than the default profile.

After the web server definition is created, the web server plug-in configuration service within the application server creates the first plugin-cfg.xml file in the web server definition on the application server machine. If you install an application, create a virtual host, or do anything that changes the configuration, you must propagate the updated plugin-cfg.xml file from the application server machine to the web server machine to replace the default file.

[AIX Solaris HP-UX Linux Windows]

Configureweb_server_name script for the web server definition

The Web Server Plug-ins Configuration Tool creates the configureweb_server_name script on the web server machine in the plugins_root/bin directory. If one machine in a remote scenario is running under an operating system like AIX® or Linux® and the other machine is running under Windows, use the script created in the plugins_root/bin/crossPlatformScripts directory. The script is created for remote installation scenarios only.

Copy the script from the web server machine to the app_server_root/bin directory on a remote application server machine. You do not have to copy the script on a local installation. Run the script to create a web server definition in the configuration of the application server.

When using the IBM HTTP Server, configure the IBM HTTP Administration Server also. The IBM HTTP Administration Server works with the administrative console to manage web server definitions. Also, use the administrative console to update your web server definition with remote web server management options. Click Servers > Server Types > Web servers > web_server_name to see configuration options. For example, click Remote Web server management to change such properties as:
  • Host name
  • Administrative port
  • User ID
  • Password
Important: Always open a new command window before running this script. You can avoid a potential problem by doing so.

The problem is a potential conflict between a shell environment variable, the WAS_USER_SCRIPT environment variable, and the actual default profile. The script always works against the default profile. If the WAS_USER_SCRIPT environment variable is set, however, a conflict arises as the script attempts to work on the profile identified by the variable.

The variable is easy to set accidentally. Issue any command from the profile_root/bin directory of any profile and the variable is set to that profile.

If you have more than one profile on your system, the potential exists that the default profile and the profile identified by the variable are different profiles. If so, a conflict occurs and the script might not create the web server definition in the correct profile, or might not create the web server definition at all.

Reset the variable in either of two ways:
  • Close the command window where the variable is set and open a new one.
  • Change directories to the profile_root/bin directory of the default profile and source the setupCmdLine.sh script:
    [Windows]
    1. Open a command prompt window.
    2. Change directories to the app_server_root\bin directory.
    3. Issue the setupCmdLine.bat command.
    [Linux][AIX][Solaris][HP-UX]
    1. Open a command shell window.
    2. Change directories to the app_server_root/bin directory.
    3. Issue the . ./setupCmdLine.sh command. Notice the space between the periods. The special format for this command sources the command to make the setting active for all processes started from the command shell.

If a web server definition already exists for a standalone application server, running the script does not add a new web server definition. Each standalone application server can have only one web server definition.

You cannot use the administrative console of a standalone application server to add or delete a Web server definition. However, you can do both tasks using the administrative scripting interface:
  • Add a web server definition through the wsadmin facility using the configureweb_server_name script. The script uses a Java™ Command Language (Jacl) script named configureWebserverDefintion.jacl to create and configure the web server definition.
  • Delete a web server definition using wsadmin commands. The Web server is named webserver1 in the following example:
     set webserverName webserver1
     set webserverNodeSuffix _node
     set webserverNodeName   $webserverName$webserverNodeSuffix
     $AdminConfig remove [$AdminConfig getid /Node:$webserverNodeName/Server:$webserverName]
     $AdminConfig remove [$AdminConfig getid /Node:$webserverNodeName]
     $AdminConfig save
    
[IBM i]

Configuration script for the Web server definition

Configuring your web server with the configureOs400WebserverDefinition script or using the IBM i Administrative GUI creates the configureweb_server_name script on the web server machine in the plugins_root/bin directory. The script is created for remote installation scenarios only.

Copy the script from the web server machine to the app_server_root/bin directory in the IBM i partition. Run the script to create a web server definition in the configuration of the application server.

The IBM i Administrative GUI has plug-ins that allow the administrative console to manage IBM HTTP Servers. Use the administrative console to update your web server definition with remote web server management options. Click Servers > Server Types > Web servers > web_server_name to see configuration options. For example, click Remote Web server management to change such properties as:
  • Host name
  • Administrative port
  • User ID
  • Password

If a web server definition already exists for a standalone application server, running the script does not add a new web server definition. Each standalone application server can have only one Web server definition.

You cannot use the administrative console of a standalone application server to add or delete a web server definition. However, you can do both tasks using the administrative scripting interface:
  • Add a web server definition through the wsadmin facility using the configureweb_server_name script. The script uses a Java Command Language (Jacl) script named configureWebserverDefintion.jacl to create and configure the web server definition.
  • Delete a web server definition using wsadmin commands. The Web server is named webserver1 in the following example:
    set webserverName webserver1
    set webserverNodeSuffix _node
    set webserverNodeName 
    $webserverName$webserverNodeSuffix
    $AdminConfig remove 
      [$AdminConfig getid 
        /Node:$webserverNodeName/Server:$webserverName]
    $AdminConfig remove 
      [$AdminConfig getid /Node:$webserverNodeName]
    $AdminConfig save
    

Alternatively, you can use the configureOs400WebServerDefinition and removeOs400WebServerDefinition scripts to perform these tasks.

Replacing the default plug-in configuration file with the file from the web server definition (propagation)

The default file uses fixed parameter values that might not match the parameter values in the actual file on the application server. The default file is a placeholder only.

The file cannot reflect changes that occur in the application server configuration. The file also cannot reflect nondefault values that might be in effect on the application server.

[AIX Solaris HP-UX Linux Windows]The application server must have the following values in the actual plugin-cfg.xml file. If so, the default file can successfully configure the binary plug-in module. Then, the plug-in module can successfully communicate with the web server and the application server.

[AIX Solaris HP-UX Linux Windows]Suppose that the application server does not have the following values in the actual plugin-cfg.xml file. In that case, the default file configures the binary plug-in module incorrectly. The plug-in module can always communicate with the web server. But with an improper configuration file, the plug-in module cannot communicate successfully with the application server.

[AIX Solaris HP-UX Linux Windows]The following are fixed parameter values in the temporary plug-in configuration file.
  • Virtual host name

    Default value: default_host

    This virtual host is configured to serve the DefaultApplication. This value is probably the same as the value in the real plugin-cfg.xml file. However, suppose that you create another virtual host for serving applications and install the DefaultApplication on it. If so, the actual plugin-cfg.xml file is regenerated. The web server cannot access the DefaultApplication. (The application includes the snoop servlet and the hitcount servlet.)

    To access applications on the new virtual host, propagate the real plugin-cfg.xml file. Propagation is copying the updated file from the application server machine to the web server machine.

  • HTTP transport port

    Default value: 9080

    The 9080 value is the default value for the HTTP transport port for the default_host virtual host. This value is probably the same as the value in the updated file. However, this value changes for every profile on the application server machine. The HTTP transport port value must be unique for every application server.

    To communicate over a different port, propagate the real plugin-cfg.xml file.

  • Web server listening port

    Default value: 80

    The 80 value is the default value for the port that controls communication with the web server. However, each application server profile must have a unique port value to communicate to a web server. The actual port value might be 81 or another number.

    To communicate over a different port, propagate the real plugin-cfg.xml file.

  • HTTPS transport port

    Default value: 9443

    The 9443 value is the default value for the HTTPS (secure) transport port for the default_host virtual host. This value is probably the same as the value in the updated file. However, this value changes for every profile on the application server machine. The HTTPS transport port value must be unique for every application server.

    To communicate over a different secure port, propagate the real plugin-cfg.xml file.

  • Applications installed on the server1 application server

    All of the default servlets and applications are included in the default file.

    To serve an application that you developed with the web server, propagate the real plugin-cfg.xml file.