Customising

pull/63/head
Ivan Grynenko 8 years ago
parent 77a83a697a
commit 534785f752
  1. 4
      tasks/vhosts.yml
  2. 2
      templates/vhosts.j2

@ -1,4 +1,8 @@
---
- name: Creates Nginx conf directories
file: path={{ nginx_vhost_path }} state=directory mode=0755 recurse=yes
when: nginx_vhosts|length > 0
- name: Remove default nginx vhost config file (if configured).
file:
path: "{{ nginx_default_vhost_path }}"

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