4.12.1 Generating multiple Web server environment (hwsserveredit command)
If multiple Web servers are running on a single server machine and not in the virtual host, you need to set the environment such as preparing the httpsd.conf on each Web server. The hwsserveredit command supplements this environment setting.
- Organization of this subsection
(1) Format
hwsserveredit {-add|-add_woker|-add_prefork|-delete|-check} server-name
(2) Parameters
-
-add
Specify this parameter when you create a new server environment. If the command receives a request, create a directory with the same name as the specified server name, and then create the httpsd.conf and logs directory. Additionally, for Windows version, use the server name and register HTTP Server as a service. In the UNIX version of HTTP Server, the worker MPM module is set in httpsd.conf.
-
-add_worker
This parameter can be used in the UNIX version of HTTP Server. Specify this parameter to create a new server environment. Upon accepting a request, the command creates a subdirectory in the servers directory by using the same name as the specified server name, and the command then creates the httpsd.conf file and the logs directory in that subdirectory. The worker MPM module is set in the created httpsd.conf file.
-
-add_prefork
This parameter can be used in the UNIX version of HTTP Server. Specify this parameter to create a new server environment. Upon accepting a request, the command creates a subdirectory in the servers directory by using the same name as the specified server name, and the command then creates the httpsd.conf file and the logs directory in that subdirectory. The prefork MPM module is set in the created httpsd.conf file.
-
-delete
Specify this parameter to delete a server environment. If the command receives a request, this parameter deletes the directory with the name same as the server name under the server directory. For Windows version, this parameter deletes the service of server name.
-
-check
Specify this parameter to confirm that the server environment is built. If the command receives a request, and if there is a resource that is created when the -add parameter is requested, judge that the server startup environment is built.
-
server-name ~ ((1-(220-path length of HTTP Server installation directory), or 128 bytes or below))
Specify a unique character string for each server. However, you cannot specify "Cosminexus HTTP Server". Also, you cannot specify the character string "Cosminexus HTTP Server" (such as "Cosminexus HTTP Server") formed by removing the spaces in the character string.
(3) How to use
(a) Creating the resource
Determine the server name of each server, and execute the hwsserveredit command. Specify the following, if the server name is HWS1:
hwsserveredit -add HWS1
The hwsserveredit command creates directories and files under the server directory that is created when installing the server. In Windows version, the utility registers the service using server name at the same time when creating directories and files.
The configuration of directories and files are as follows:
+httpsd +servers +HWS1 +conf | +httpsd.conf +logs
(b) Editing the httpsd.conf
Change the httpsd.conf directive value in the created resources.
When you generate multiple environments, change the values of following directives so that the environment does not clash with other environments:
-
ServerName directive
-
Port directive or Listen directive
-
PidFile directive
For the UNIX version, change the setting value of following directives according to the environment:
-
User directive
-
Group directive
Other directives are set in such a way that they can run even if you do not change their settings depending upon the hwsserveredit command. Depending upon the operations, change the settings if required.
For details on each directive, see 6.2 Details of the directives.
(c) Starting up the server
Start up the server by following method:
-
For UNIX version
/opt/hitachi/httpsd/sbin/httpsd -f servers/HWS1/conf/httpsd.conf
-
For Windows version
"Application-Server-installation-directory\httpsd.exe" -n HWS1 -k start
Moreover, start up the HWSI service from the control panel.
(d) Setting up the multiple server environments
To set the multiple server environments repeat operations from (a) to (c).
(4) Notes
-
Run the command as a user with administrator permissions. Do not move the command location.
-
Specify server name with the ASCII codes. Note that you cannot specify the following characters:
'
', '/', ':', ',', ';', '*', '?', '"', '<', '>', '|', '$', '%', '^', ''', '!', '(', ')', '=', '+', '{', '}', '@', '[', ']', '~', and control codes
-
In a server name, you cannot specify a name that consists of only a period. Additionally, if there is an immediate space before or after the name, remove the space.
-
When registering the service, register the startup type manually.
-
Do not change the display name of registered service.