How to configure WebSphere web server plugin using pct command

Home > Search > How-to
  by

This assumes you have already installed IHS web server, the IBM web server plugin, and the WebSphere Customization Toolbox. Customizing the web server plugin configures the plugin so that the web server can server applications running on WebSphere application server.

Ccreate the response.txt file. This file usually resides in the /opt/IBM/WebSphere/WCT directory (on Linux). The IHS Admin values can be obtained from the ihs_home/conf/admin.conf file. In this example, the response.txt file is being used to configure a remote web server (eg. the web server and application server are on different machines).

configType=remote
enableAdminServerSupport=true
enableUserAndPass=true
enableWinService=false
ihsAdminCreateUserAndGroup=true
ihsAdminPassword=******
ihsAdminPort=8008
ihsAdminUnixUserGroup=grp101
ihsAdminUnixUserID=user1
mapWebServerToApplications=true
profileName=AppSrv01
wasMachineHostname=example.com
webServerConfigFile1=/opt/IBM/HTTPServer/conf/httpd.conf
webServerDefinition=webserver1
webServerHostName=remote.ibm.com
webServerOS=operating_system_value
webServerPortNumber=80
webServerSelected=ihs

 

Create the definition.

./wctcmd.sh -tool pct -defLocPathname /opt/IBM/WebSphere/Plugins -defLocName DefaultDefinition -createDefinition -response /opt/IBM/WebSphere/WCT/response.txt

 

You can list your definitions, for assurance that the definition was created.

./wctcmd.sh -tool pct -listDefinitionLocations

 

If something went wrong, you can delete a definition.

./wctcmd.sh -tool pct -defLocPathname /opt/IBM/WebSphere/Plugins -removeDefinitionLocation /opt/IBM/WebSphere/Plugins

 

Upon completion, the web server definition directory should be created, and the web server plugin files should reside in the web server definition directory. For example, if the web server definition is webserver1, then the plugin_home/config/webserver1 will be created, and the plugin files will be in the webserver1 directory.

Also, the configurewebservername.sh (Linux) or configurewebservername.bat (Windows) file will be created in the plugin_home/bin/ directory on the web server. If you are setting up a remote web server, copy the configurewebservername.sh (Linux) or configurewebservername.bat (Windows) file from the web server to the dmgr_home/bin/ directory on the application server. Then, run the script on the dmgr. The configurewebservername script contains a wsadmin command that is used to setup and configure the web server plugin.

./wsadmin.sh 
profile_name 
userid 
password 
-f was_home/bin/configureWebserverDefinition.jacl 
webserver1 
IHS 
'/opt/IBM/HTTPServer' 
'/opt/IBM/HTTPServer/conf/httpd.conf' 
80 
MAP_ALL 
'/opt/IBM/WebSphere/Plugins' 
unmanaged 
example.com-node 
example.com 
linux

 

After the configirewebserverdefinition scipt is run, the web server should be added to the WebSphere admin console, and you should be able to start the web server. If the web server fails to start, ensure ports 80 and 443 are open on the web server. 

The script will also make changes to the plugin-cfg.xml file on the web server. In this example, the web server is able to route request to two application servers (server1 server2) in a cluster (cluster1), and the /beta app can be produced.

<VirtualHostGroup Name="default_host">
  <VirtualHost Name="*:80"/>
  <VirtualHost Name="*:443"/>
  <VirtualHost Name="*:9080"/>
  <VirtualHost Name="*:9081"/>
  <VirtualHost Name="*:9443"/>
  <VirtualHost Name="*:9444"/>
</VirtualHostGroup>


<ServerCluster Name="cluster1">
  <Server Name="server1">
    <Transport Port="9080" Protocol="http"/>
    <Transport Port="9443" Protocol="https"/>
    </Transport>
  </Server>
  <Server Name="server2">
    <Transport Port="9081" Protocol="http"/>
    <Transport Port="9444" Protocol="https"/>
    </Transport>
  </Server>
</ServerCluster>


<UriGroup Name="server1_Cluster_URIs">
  <Uri Name="/beta/*"/>
</UriGroup>

 

You should now be able to produce apps running on your app server from the web server.

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter in the box below so that we can be sure you are a human.




Comments