make the "server_name" directive optional

This commit is contained in:
Benjamin Smith 2016-03-29 12:35:06 -04:00
parent e818255465
commit 102949fcb8

View File

@ -1,7 +1,10 @@
{% for vhost in nginx_vhosts %}
server {
listen {{ vhost.listen | default('80 default_server') }};
{% if vhost.server_name is defined %}
server_name {{ vhost.server_name }};
{% endif %}
{% if vhost.root is defined %}
root {{ vhost.root }};