Add parameters ServerAlias

This commit is contained in:
Kevin ARBOUIN 2014-12-29 21:56:03 +01:00
parent 2dfd2026ef
commit c4b6fa8bb4
3 changed files with 13 additions and 1 deletions

View file

@ -7,7 +7,7 @@ apache_listen_port_ssl: 443
apache_create_vhosts: true
apache_vhosts:
# Additional properties: 'serveradmin, extra_parameters'.
# Additional properties: 'serveradmin, serveralias, extra_parameters'.
- {servername: "local.dev", documentroot: "/var/www/html"}
apache_vhosts_ssl: []

View file

@ -5,6 +5,9 @@ DirectoryIndex index.php index.html
{% for vhost in apache_vhosts %}
<VirtualHost *:{{ apache_listen_port }}>
ServerName {{ vhost.servername }}
{% if vhost.serveralias is defined %}
ServerAlias {{ vhost.serveralias }}
{% endif %}
DocumentRoot {{ vhost.documentroot }}
{% if vhost.serveradmin is defined %}
@ -27,6 +30,9 @@ DirectoryIndex index.php index.html
{% for vhost in apache_vhosts_ssl %}
<VirtualHost *:{{ apache_listen_port_ssl }}>
ServerName {{ vhost.servername }}
{% if vhost.serveralias is defined %}
ServerAlias {{ vhost.serveralias }}
{% endif %}
DocumentRoot {{ vhost.documentroot }}
SSLEngine on

View file

@ -5,6 +5,9 @@ DirectoryIndex index.php index.html
{% for vhost in apache_vhosts %}
<VirtualHost *:{{ apache_listen_port }}>
ServerName {{ vhost.servername }}
{% if vhost.serveralias is defined %}
ServerAlias {{ vhost.serveralias }}
{% endif %}
DocumentRoot {{ vhost.documentroot }}
{% if vhost.serveradmin is defined %}
@ -26,6 +29,9 @@ DirectoryIndex index.php index.html
{% for vhost in apache_vhosts_ssl %}
<VirtualHost *:{{ apache_listen_port_ssl }}>
ServerName {{ vhost.servername }}
{% if vhost.serveralias is defined %}
ServerAlias {{ vhost.serveralias }}
{% endif %}
DocumentRoot {{ vhost.documentroot }}
SSLEngine on