mirror of
https://github.com/geerlingguy/ansible-role-apache
synced 2024-11-14 17:30: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_create_vhosts: true
|
||||||
|
|
||||||
apache_vhosts:
|
apache_vhosts:
|
||||||
# Additional properties: 'serveradmin, extra_parameters'.
|
# Additional properties: 'serveradmin, serveralias, extra_parameters'.
|
||||||
- {servername: "local.dev", documentroot: "/var/www/html"}
|
- {servername: "local.dev", documentroot: "/var/www/html"}
|
||||||
|
|
||||||
apache_vhosts_ssl: []
|
apache_vhosts_ssl: []
|
||||||
|
|
|
@ -5,6 +5,9 @@ DirectoryIndex index.php index.html
|
||||||
{% for vhost in apache_vhosts %}
|
{% for vhost in apache_vhosts %}
|
||||||
<VirtualHost *:{{ apache_listen_port }}>
|
<VirtualHost *:{{ apache_listen_port }}>
|
||||||
ServerName {{ vhost.servername }}
|
ServerName {{ vhost.servername }}
|
||||||
|
{% if vhost.serveralias is defined %}
|
||||||
|
ServerAlias {{ vhost.serveralias }}
|
||||||
|
{% endif %}
|
||||||
DocumentRoot {{ vhost.documentroot }}
|
DocumentRoot {{ vhost.documentroot }}
|
||||||
|
|
||||||
{% if vhost.serveradmin is defined %}
|
{% if vhost.serveradmin is defined %}
|
||||||
|
@ -27,6 +30,9 @@ DirectoryIndex index.php index.html
|
||||||
{% for vhost in apache_vhosts_ssl %}
|
{% for vhost in apache_vhosts_ssl %}
|
||||||
<VirtualHost *:{{ apache_listen_port_ssl }}>
|
<VirtualHost *:{{ apache_listen_port_ssl }}>
|
||||||
ServerName {{ vhost.servername }}
|
ServerName {{ vhost.servername }}
|
||||||
|
{% if vhost.serveralias is defined %}
|
||||||
|
ServerAlias {{ vhost.serveralias }}
|
||||||
|
{% endif %}
|
||||||
DocumentRoot {{ vhost.documentroot }}
|
DocumentRoot {{ vhost.documentroot }}
|
||||||
|
|
||||||
SSLEngine on
|
SSLEngine on
|
||||||
|
|
|
@ -5,6 +5,9 @@ DirectoryIndex index.php index.html
|
||||||
{% for vhost in apache_vhosts %}
|
{% for vhost in apache_vhosts %}
|
||||||
<VirtualHost *:{{ apache_listen_port }}>
|
<VirtualHost *:{{ apache_listen_port }}>
|
||||||
ServerName {{ vhost.servername }}
|
ServerName {{ vhost.servername }}
|
||||||
|
{% if vhost.serveralias is defined %}
|
||||||
|
ServerAlias {{ vhost.serveralias }}
|
||||||
|
{% endif %}
|
||||||
DocumentRoot {{ vhost.documentroot }}
|
DocumentRoot {{ vhost.documentroot }}
|
||||||
|
|
||||||
{% if vhost.serveradmin is defined %}
|
{% if vhost.serveradmin is defined %}
|
||||||
|
@ -26,6 +29,9 @@ DirectoryIndex index.php index.html
|
||||||
{% for vhost in apache_vhosts_ssl %}
|
{% for vhost in apache_vhosts_ssl %}
|
||||||
<VirtualHost *:{{ apache_listen_port_ssl }}>
|
<VirtualHost *:{{ apache_listen_port_ssl }}>
|
||||||
ServerName {{ vhost.servername }}
|
ServerName {{ vhost.servername }}
|
||||||
|
{% if vhost.serveralias is defined %}
|
||||||
|
ServerAlias {{ vhost.serveralias }}
|
||||||
|
{% endif %}
|
||||||
DocumentRoot {{ vhost.documentroot }}
|
DocumentRoot {{ vhost.documentroot }}
|
||||||
|
|
||||||
SSLEngine on
|
SSLEngine on
|
||||||
|
|
Loading…
Reference in a new issue