Zend Server User Guide > Tasks > Working with CLI Tools > vhost-add-secure

vhost-add-secure-secure

This CLI command adds an SSL-secured virtual host to Zend Server.

Command Specific Arguments

This table specifies the various arguments used in the command:

Abbreviated Full Description Required/Optional

-n

--force

The virtual host name.

Required

-p

--port

The virtual host port.

Required

-e

--sslCertificateChainPath

For Intermediate SSL - file path to the SSL chain file.

 Required (for Intermediate SLL)

-t

--template

The virtual host 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`".

Common Arguments

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

 

 

Instructions on how to complete a procedure

To use vhost-add-secure:

  1. Open your CLI.
  1. Enter a help command for the vhost-add-secure action to learn which arguments your command should include:

/usr/local/zend/bin/zs-manage vhost-add-secure --help

  1. Enter the command with the required arguments (replace brackets with your value):

/usr/local/zend/bin/zs-manage vhost-add-secure -n <vhost name> -p <port number> -N <existing key name> -K <existing key secret>

The virtual host is created. Your CLI returns information about your virtual host:

vhostInfo 4 myvhost 444 true PendingRestart

 

 

 

Read Also

  CLI Tools    
  Working with CLI Tools