Virtual Host Template Legend

This legend lists the variables included in the configuration template of a virtual host. These variables can be changed when creating or editing a virtual host. For information on working with virtual hosts, see Working with Virtual Hosts.

Warning!

Editing the virtual host template could cause problems to your Web server's configuration.

Variable Description

${port}

The virtual host port.

${virtual host}

The virtual host name.

${docroot}

The virtual host document root.

${aliasdir}

The folder containing virtual host aliases.

${certificate_file}

The file path to the SSL certificate.

${certificate_key_file}

The file path to the SSL certificate key.

${certificate_chain_file}

The file path to the SSL chain file.

${certificate_application_name}

The SSL application name.

Example

This is an example of a configuration template for an SSL-secured virtual host:

# Created by Zend Server

 

<VirtualHost *:${port}>

DocumentRoot "C:\Program Files (x86)\Zend\ZendServer\data\apps\https\newvirtual host\443\3.2.1/"

<Directory "C:\Program Files (x86)\Zend\ZendServer\data\apps\https\newvirtual host\443\3.2.1/">

Options +Indexes

DirectoryIndex index.php

Order allow,deny

Allow from all

AllowOverride All

</Directory>

 

SSLEngine on

SSLCertificateFile ${certificate_file}

SSLCertificateKeyFile ${certificate_key_file}

SSLCertificateChainFile ${certificate_chain_file}

 

ServerName ${virtual host}:${port}

Include "${aliasdir}/*.conf"

</VirtualHost>

# Created by Zend Server

<VirtualHost *:10080>

DocumentRoot "/usr/local/zendphp7/var/apps/http/2013-11-06-06-24-45/10080/_docroot_"

<Directory "/usr/local/zendphp7/var/apps/http/2013-11-06-06-24-45/10080/_docroot_">

Options +Indexes FollowSymLinks

DirectoryIndex index.php

Order allow,deny

Allow from all

AllowOverride All

</Directory>

 

SSLEngine on

SSLAppName TESTQA

 

ServerName 2013-11-06-06-24-45:10080

Include "/usr/local/zendphp7/etc/sites.d/http/2013-11-06-06-24-45/10080/*.conf"

</VirtualHost>