Explorar o código

make the "server_name" directive optional

Benjamin Smith %!s(int64=9) %!d(string=hai) anos
pai
achega
102949fcb8
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      templates/vhosts.j2

+ 3 - 0
templates/vhosts.j2

@@ -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 }};