mirror of
https://github.com/geerlingguy/ansible-role-apache
synced 2024-12-22 02:50:19 +01:00
Merge pull request #22 from lesmyrmidons/master
Add optional parameter ServerAlias
This commit is contained in:
commit
bc807c9cdb
3 changed files with 13 additions and 1 deletions
|
@ -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: []
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue