You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
ansible-role-nginx/templates/vhost.j2

32 lines
713 B

server {
listen {{ item.listen | default('80') }};
{% 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 %}
}