summaryrefslogtreecommitdiff
path: root/roles/nginx/vhost/templates/no-tls.conf.j2
blob: 317adaec224becf481e9234aefd208e2895c3836 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
server {
{% for listen in (nginx_vhost.listen | default(['80', '[::]:80'])) %}
    listen {{ listen }}{% if 'default' in nginx_vhost and nginx_vhost.default %} default_server{% endif %};
{% endfor %}
    server_name {{ nginx_vhost.hostnames | default(['_']) | join(' ') }};

{% if 'logs' in nginx_vhost %}
{%   if 'access' in nginx_vhost.logs %}
    access_log {{ nginx_vhost.logs.access }};
{%   endif %}
{%   if 'error' in nginx_vhost.logs %}
    error_log {{ nginx_vhost.logs.error }};
{%   endif %}

{% endif %}
{% include 'includes/body.j2' %}
}