Skip to content

Commit 6297ac2

Browse files
author
Pierre Buyle
committed
Merge #12: Virtual host as default
2 parents 61b3382 + 5d202d8 commit 6297ac2

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ The following variables are available to configure the role:
9292
- **certificate_key**: Path to the SSL secret key of the server (in the
9393
PEM format).
9494
- **server_name**: The (primary) server name.
95+
- **default**: Indicate the virtual host as default (boolean).
9596
- **ipv6**: (optional) IPv6 address of the server
9697
- **alternate_server_name**: (optional) Alternate server name, configured
9798
as redirect to the primary server site. This can be used to remove the

templates/sites-available/drupal-site.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ server {
2424
listen [{{item.ipv6}}]:{{item.http.port}} ipv6only=on;
2525
{% endif %}
2626

27-
server_name {{item.server_name}};
27+
server_name {{item.server_name}}{% if item.default is defined and item.default %} default{% endif %};
2828
{% if item.limit_conn is defined and item.limit_conn != 'None' %}
2929
limit_conn {{item.limit_conn|default('arbeit 32')}};
3030
{% endif %}
@@ -227,7 +227,7 @@ server {
227227
{% endif %}
228228
{% endif %}
229229

230-
server_name {{item.server_name}};
230+
server_name {{item.server_name}}{% if item.default is defined and item.default %} default{% endif %};
231231

232232
{% if item.limit_conn is defined and item.limit_conn != 'None' %}
233233
limit_conn {{item.limit_conn|default('arbeit 32')}};

0 commit comments

Comments
 (0)