This CLI command adds a virtual host to Zend Server.
This table specifies the various arguments used in the command:
Abbreviated | Full | Description | Required/Optional |
-n |
--name |
The virtual host name. |
Required |
-p |
--port |
The virtual host port. |
Required |
-t |
--template |
The virtual host configuration template. |
Optional |
Tip:
When using the -t argument, instead of specifying the entire template, use `cat to refer to an existing file containing the template . For example, -t "`cat template`".
This table lists arguments common to all zs-manage commands:
Abbreviated | Full | Description | Required/Optional |
-N |
--key-name |
WebAPI key name. |
Required |
-K |
--secret-key |
WebAPI secret key. |
Required |
-U |
--server-url |
Zend Server URL. Default: http://localhost:10081/ZendServer. |
Required - when action is performed on a remote server. |
-h |
--help |
Show usage information and exit. |
Optional |
|
|
|
To use vhost-add:
/usr/local/zend/bin/zs-manage vhost-add --help
/usr/local/zend/bin/zs-manage vhost-add -n <vhost name> -p <port number> [optional parameters - see table above} -N <existing key name> -K <existing key secret> The virtual host is created. Your CLI returns information about your virtual host: vhostInfo 2 myvhost 444 false PendingRestart |
|
To make the virtual host available, restart Zend Server. |