3.4.1 Starting and stopping Cosminexus HTTP Server
When you install Cosminexus HTTP Server, it is registered in the system as a service called Cosminexus HTTP Server. The server is registered as a service to be started manually. the service does not start automatically when the OS is started.
To start, stop, and restart Cosminexus HTTP Server, you can use any of the following methods:
- Starting, stopping, and restarting the service from Management Server
- Starting and stopping as a service from the Control Panel
- Starting, stopping, and restarting from the Command Prompt
When executing Cosminexus HTTP Server as a service, the user account will be "LocalSystem" at the time of installation. Cosminexus HTTP Server including the CGI program and the API connection module is executed by this user account. For operation by other user accounts, see 3.4.2 Operation by general user accounts.
- Organization of this subsection
- (1) Starting, stopping, and restarting the service from Management Server
- (2) Starting and stopping as a service from the control panel
- (3) Starting, stopping, and restarting from the Command Prompt
- (4) Operating Cosminexus HTTP Server from a remote machine using the terminal service
- (5) Notes
(1) Starting, stopping, and restarting the service from Management Server
For details, see 4.1.2 How to start the system or 4.1.4 How to stop the system in the manual Cosminexus Application Server Operations Management Portal Operation Guide.
(2) Starting and stopping as a service from the control panel
Open the Service window from the Control Panel, select Cosminexus HTTP Server, and then click the Start button to start Cosminexus HTTP Server, or click the Stop button to stop Cosminexus HTTP Server. You cannot restart Cosminexus HTTP Server from the Service window.
(3) Starting, stopping, and restarting from the Command Prompt
Enter the httpsd command from the command prompt. The httpsd command is coded below:
(a) Format
"<Cosminexus-installation-directory>\httpsd\httpsd.exe" [[-d directory][-f file-name][ [-n "Service-name"][-k {start | stop | restart | gracefulstop | install | uninstall} ] ]| -v | -t ] |
(b) Options
- -d directory
Use this option to set the default value used when the ServerRoot directive is not specified in the configuration file.
- -f file-name
Use this option to specify the httpsd.conf file. Specify the file name with an absolute path, or with a relative path from the specified value of the ServerRoot directive.
- -n "Service-name"
Use this option to specify the service name of Cosminexus HTTP Server. Specify the service name within " (quotation marks). You can specify a maximum of 128 characters in the service name. Specify the service name in ASCII code. You cannot specify the following characters in the service name:
'
', '/', '"', control codes, and multi-byte characters
The default value of the service name is Cosminexus HTTP Server.
If you specify this option, you also need to specify the -k option.
- -k start
Use this option to start Cosminexus HTTP Server. When the -n "Service name" is specified, the corresponding service starts.
- -k stop
Use this option to stop Cosminexus HTTP Server. When the -n "Service name" is specified, the corresponding service stops.
- -k restart
Use this option to restart Cosminexus HTTP Server.
- -k gracefulstop
Use this option to stop Cosminexus HTTP Server. The option stops the server after ending the running server threads. If running server threads do not end, the server threads will end when the waiting time specified in the HWSGracefulStopTimeout directive ends.
- -k install
Use this option to register Cosminexus HTTP Server as a service. When the -n "service name" is specified, the corresponding service is registered. When registering the service, the startup type will be 'Manual'. When Cosminexus HTTP Server starts as a service, it sets the default value of the ServerRoot directive to the path specified in the httpsd.exe command or to the value specified in the -d option.
- -k uninstall
Use this option to delete Cosminexus HTTP Server from the service. When the -n "service name" is specified, the corresponding service is deleted. If the service is running, first stops the service and then deletes the service.
- -v
Use this option to display the version information. Cosminexus HTTP Server does not start when you specify this option.
- -t
Use this option to check the configuration file syntax. If there is a syntax error, an error message is displayed on the screen. Cosminexus HTTP Server does not start when you specify this option.
(4) Operating Cosminexus HTTP Server from a remote machine using the terminal service
By using the terminal service functionality in Windows 7, Windows Vista, Windows XP Professional, Windows Server 2008 R2, or Windows Server 2008, you can start and stop Cosminexus HTTP Server, or execute commands on the server computer from a remote machine.
For details on operating a terminal service, see the OS manual.
(5) Notes
When Cosminexus HTTP Server is stopped from Control Panel, or by the -k stop option executed from a command prompt, if a server thread is running, it will stop after waiting up to 30 seconds.