|
|
- # {{ ansible_managed }}
-
- server {
-
- {% for key,value in item.server|dictsort if key != 'file_name' %}
- {{ key }} {{ value }};
- {% if nginx_separate_logs_per_site == True %}
- access_log {{ nginx_log_dir }}/{{ item.server.server_name }}-{{ nginx_access_log_name }};
- error_log {{ nginx_log_dir }}/{{ item.server.server_name }}-{{ nginx_error_log_name }};
- {% endif %}
-
- {% endfor %}
- {% if item.use_for_challenge is defined %}
- location /.well-known/acme-challenge {
- root {{ letsencrypt_challenge_webroot }};
-
- }
- {% endif %}
- {% if 'location' in item %}
- {% for location in item.location if 'location' in item %}
- location {{ location.name }} { {% for key,value in location|dictsort if key != 'name' %}
- {{ key }} {{ value }}; {% endfor %}
-
- }
- {% endfor %}
- {% endif %}
- }
-
|