소스 검색

make the "server_name" directive optional

Benjamin Smith 9 년 전
부모
커밋
102949fcb8
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  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 }};