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/vhosts.j2

36 lines
813 B

{% for vhost in nginx_vhosts -%}
server {
listen {{ vhost.listen | default('80 default_server') }};
server_name {{ vhost.server_name }};
{%- if vhost.root is defined -%}
root {{ vhost.root }};
{% endif %}
{%- if vhost.index is defined -%}
index {{ vhost.index }};
{% endif %}
{%- if vhost.error_page is defined -%}
error_page {{ vhost.error_page }};
{% endif %}
{%- if vhost.access_log is defined -%}
access_log {{ vhost.access_log }};
{% endif %}
{%- if vhost.error_log is defined -%}
error_log {{ vhost.error_log }} error;
{% endif %}
{%- if vhost.return is defined -%}
return {{ vhost.return }};
{% endif %}
{%- if vhost.extra_parameters is defined -%}
{{ vhost.extra_parameters }}
{% endif %}
}
{% endfor %}