Bootstrap FreeKB - IBM WebSphere - Setting web server plugin (plugin-cfg.xml) Custom Properties
IBM WebSphere - Setting web server plugin (plugin-cfg.xml) Custom Properties

Updated:   |  IBM WebSphere articles

This assumes you have already done the following:

By default, the web server plugin (plugin-cfg.xml) will not have any custom properties. Custom Properties can be set in the WebSphere admin console at Servers > Server types > Web servers > your web server > Plug-in properties > Custom properties. For example, following are some of the more common Custom Properties.

  • SecureHostVerification
  • HostVerificationStartupCheck
  • UseInsecure

It is important to recognize that you may have two (or more) plugin-cfg.xml files. 

  • global plugin-cfg.xml file that would be used by all of the IHS HTTP servers that have been added in your WebSphere admin console
  • dedicated plugin-cfg xml file(s), one for each IHS HTTP server that has been added in your WebSphere admin console

The Custom Properties would only apply to a dedicated plugin-cfg xml file. If you want to add Custom Properties to the global plugin-cfg.xml file, you would modify the plugin-cfg.xml file, perhaps like this. In this example, SecureHostVerification="false" was added to line 1 of the global plugin-cfg.xml file.

<Config 
 ASDisableNagle="false"
 AcceptAllContent="true"
 AppServerPortPreference="HostHeader"
 SecureHostVerification="false">

 

On the other hand, you can add Custom Properties for a dedicated plugin-cfg xml file at Servers > Server types > Web servers > your web server > Plug-in properties > Custom properties.

Or like this, using wsadmin.

~]$ /opt/WebSphere/AppServer/profiles/your_profile/bin/wsadmin.sh -lang jython -c "print AdminConfig.create('Property', '(cells/your_cell/nodes/your_web_node/servers/your_web_node|server.xml#PluginProperties_1665772887624)', '[[validationExpression \"\"] [name \"HostVerificationStartupCheck\"] [description \"\"] [value \"false\"] [required \"false\"]]')"
WASX7209I: Connected to process "dmgr" on node DevUnicaMgr10 using SOAP connector;  The type of process is: DeploymentManager
HostVerificationStartupCheck(cells/your_cell/nodes/your_web_node/servers/your_web_node|server.xml#Property_1698070993269)

 

And save the change to the master configuration.

/opt/WebSphere/AppServer/profiles/your_profile/bin/wsadmin.sh -lang jython -c "print AdminConfig.save()"

 

And then this wsadmin command can be used to verify the Custom Properties are set.

/opt/WebSphere/AppServer/profiles/your_profile/bin/wsadmin.sh -lang jython -c "print AdminConfig.list('Property', '(cells/your_cell/nodes/your_web_node/servers/your_web_server|server.xml#PluginProperties_1665772887624)')"
HostVerificationStartupCheck(cells/your_cell/nodes/your_web_node/servers/your_web_server|server.xml#Property_1698076787804)
SecureHostVerification(cells/your_cell/nodes/your_web_node/servers/your_web_server|server.xml#Property_1698076777219)
UseInsecure(cells/your_cell/nodes/your_web_node/servers/your_web_server|server.xml#Property_1696497760186)

 

And then when you generate the dedicated plugin-cfg.xml file, the plugin-cfg.xml file should contain the Custom Properties. There are various ways to go about generating the global or dedicated plugin-cfg.xml files.

If for some reason one or more Custom Properties are not being added to your dedicated plugin-cfg xml file you can:

For example, here is how you could generate dedicated web server plugin (plugin-cfg.xml) using GenPluginCfg with the -debug option

${WAS_INSTALL_ROOT}/bin/GenPluginCfg.sh -debug yes

 

And you should then have a plugin-cfg.log file located at.

/opt/WebSphere/AppServer/profiles/your_profile/logs/your_web_server/plugin-cfg.log

 

And the plugin-cfg.log file should include the Custom Properties being applied to the dedicated plugin-cfg xml file, something like this.

[10/20/23 3:14:27:132 CDT] 00000001 Configuration 3   PluginConfigData details:
[10/20/23 3:14:27:136 CDT] 00000001 Configuration 3      UseInsecure             : true

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


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