mirror of
https://github.com/geerlingguy/ansible-role-nginx.git
synced 2024-11-13 10:14:20 +01:00
32 lines
728 B
Django/Jinja
32 lines
728 B
Django/Jinja
server {
|
|
listen {{ item.listen | default('80 default_server') }};
|
|
|
|
{% if item.server_name is defined %}
|
|
server_name {{ item.server_name }};
|
|
{% endif %}
|
|
|
|
{% if item.root is defined %}
|
|
root {{ item.root }};
|
|
{% endif %}
|
|
|
|
index {{ item.index | default('index.html index.htm') }};
|
|
|
|
{% if item.error_page is defined %}
|
|
error_page {{ item.error_page }};
|
|
{% endif %}
|
|
{% if item.access_log is defined %}
|
|
access_log {{ item.access_log }};
|
|
{% endif %}
|
|
{% if item.error_log is defined %}
|
|
error_log {{ item.error_log }} error;
|
|
{% endif %}
|
|
|
|
{% if item.return is defined %}
|
|
return {{ item.return }};
|
|
{% endif %}
|
|
|
|
{% if item.extra_parameters is defined %}
|
|
{{ item.extra_parameters|indent(4) }}
|
|
{% endif %}
|
|
}
|