소스 검색

Added additional nginx_conf_path for Debian

For Debian systems both conf.d and sites-enabled should be included by default. Redhat systems have not been changed.

Issues came up using Kibana on Ubuntu as it installs kibana.conf in the conf.d folder.
Mark Wilde 10 년 전
부모
커밋
c02bf089a4
3개의 변경된 파일9개의 추가작업 그리고 3개의 파일을 삭제
  1. 6 1
      templates/nginx.conf.j2
  2. 2 1
      vars/Debian.yml
  3. 1 1
      vars/RedHat.yml

+ 6 - 1
templates/nginx.conf.j2

@@ -47,5 +47,10 @@ http {
     }
 {% endfor %}
 
-    include {{ nginx_vhost_path }}/*;
+{% if nginx_conf_path is defined %}
+    include {{ nginx_conf_path }};
+{% endif %}
+{% if nginx_vhost_path is defined %}
+    include {{ nginx_vhost_path }};
+{% endif %}
 }

+ 2 - 1
vars/Debian.yml

@@ -1,4 +1,5 @@
 ---
-nginx_vhost_path: /etc/nginx/sites-enabled
+nginx_conf_path: /etc/nginx/conf.d/*.conf
+nginx_vhost_path: /etc/nginx/sites-enabled/*
 nginx_default_vhost_path: /etc/nginx/sites-enabled/default
 __nginx_user: "www-data"

+ 1 - 1
vars/RedHat.yml

@@ -1,4 +1,4 @@
 ---
-nginx_vhost_path: /etc/nginx/conf.d
+nginx_vhost_path: /etc/nginx/conf.d/*
 nginx_default_vhost_path: /etc/nginx/conf.d/default.conf
 __nginx_user: "nginx"