diff --git a/templates/nginx.conf.j2 b/templates/nginx.conf.j2 index a43202c..2f40470 100644 --- a/templates/nginx.conf.j2 +++ b/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 %} } diff --git a/vars/Debian.yml b/vars/Debian.yml index b78b7c5..77881d1 100644 --- a/vars/Debian.yml +++ b/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" diff --git a/vars/RedHat.yml b/vars/RedHat.yml index 2412304..e727d4c 100644 --- a/vars/RedHat.yml +++ b/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"