You can use properties files to create, modify, or delete
Web server properties.
Before you begin
Determine the changes that you want to make to your Web
server configuration or its configuration objects.
Start the
wsadmin scripting tool. To start wsadmin using the Jython language,
run the wsadmin -lang Jython command from the bin directory
of the server profile.
About this task
Using a properties file, you can create a Web server instance.
You can also modify or delete Web server properties.
Run administrative
commands using wsadmin to extract a properties file for an Web server,
validate the properties, and apply them to your configuration.
Table 1. Actions for Web server properties
files. You can create Web server instances and modify
or delete Web server properties.
Action |
Procedure |
create |
1. Create a properties file that specifies the
following commands in the header and sets values for Web server properties:CreateDeleteCommandProperties=true
SKIP=false
commandName=createWebServer
2. Run the applyConfigProperties
command.
|
modify |
Edit properties and then run the applyConfigProperties
command to modify the value of a custom property. |
delete |
Specify the properties to delete in the properties
file and then run the deleteConfigProperties command to delete a property.
If the deleted property has a default value, the property is set to
the default value. |
create Property |
Not applicable |
delete Property |
Not applicable |
Optionally, you can use interactive mode with the commands:
AdminTask.command_name('-interactive')
Procedure
- Create a properties file for a WebServer instance.
- Open an editor and create a properties file that specifies
commands to create a WebServer instance and its properties.
For example, create a properties file such as the following
for a WebServer instance:
#
# Header
#
CreateDeleteCommandProperties=true
SKIP=false
commandName=createWebServer
#
#
#Properties
#
name=IHS #String,required
templateLocation=null #javax.management.ObjectName
genUniquePorts=null #Boolean
bitmode=null #String
specificShortName=null #String
clusterName=null #String
targetObject=targetObject #null,required
templateName=null #String
genericShortName=null #String
#
# Step parameters
#
CreateDeleteCommandProperties=true
SKIP=true
stepName=serverConfig
#
#
#Properties
#
webAppMapping=null #String
pluginInstallRoot=null #String
webProtocol=null #String
webPort=null #Integer
configurationFile=null #String
serviceName=null #String
errorLogfile=null #String
webInstallRoot=null #String
accessLogfile=null #String
#
# Step parameters
#
CreateDeleteCommandProperties=true
SKIP=true
stepName=remoteServerConfig
#
#
#Properties
#
adminPort=null #Integer
adminProtocol=null #String
adminPasswd=null #String
adminUserID=null #String
The properties file sets the
CreateDeleteCommandProperties command to true in
the header and steps. It creates a Web server named IHS and,
in the steps, configures a server and a remote server.
- Run the applyConfigProperties command to create a Web
server configuration.
Running the applyConfigProperties
command applies the properties file to the configuration. In this
Jython example, the optional -reportFileName parameter
produces a report named report.txt:
AdminTask.applyConfigProperties(['-propertiesFileName myObjectType.props -reportFileName report.txt '])
- Modify the properties file.
- Open the properties file in an editor and change the
properties as needed. Ensure that the environment variables in the
properties file match your system.
To specify a custom
property, edit the AttributeInfo value and properties
values; for example:
#
# Header
#
ResourceType=WebServer
ImplementingResourceType=WebServer
ResourceId=Cell=!{cellName}:Node=!{nodeName}:Server=!{serverName}:WebServer=
AttributeInfo=components
#
#
#Properties
#
name=IHS
webserverAdminProtocol=HTTP #ENUM(HTTPS|HTTP),default(HTTP)
logFilenameError="${WEB_INSTALL_ROOT}/logs/error.log"
configurationFilename="${WEB_INSTALL_ROOT}/conf/httpd.conf"
server=IHS#ObjectName(Server)
logFilenameAccess="${WEB_INSTALL_ROOT}/logs/access.log"
parentComponent=null
webserverProtocol=HTTP #ENUM(HTTPS|HTTP),default(HTTP)
serviceName=IBMHTTPServer7.0
webserverInstallRoot="C:\Program Files\IBM\HTTPServer"
webserverType=IHS #ENUM(HTTP_SERVER|IIS|DOMINO|APACHE|SUNJAVASYSTEM|HTTPSERVER_ZOS|IHS),default(IHS)
#
EnvironmentVariablesSection
#
#
#Environment Variables
cellName=myNode04Cell
nodeName=myNode04
serverName=IHS
- Run the applyConfigProperties command to change a Web
server configuration.
Running the applyConfigProperties
command applies the properties file to the configuration.
- Delete Web server properties.
To delete one
or more properties, specify only those properties to delete in the
properties file and run deleteConfigProperties.
AdminTask.deleteConfigProperties('[-propertiesFileName myObjectType.props -reportFileName report.txt]')
Results
You can use the properties file to configure and manage
the Web server instance and its properties.
What to do next
Save the changes to your configuration.