Merge pull request #22 from lesmyrmidons/master

Add optional parameter ServerAlias
This commit is contained in:
Jeff Geerling 2015-01-09 23:22:03 -06:00
commit bc807c9cdb
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