summaryrefslogtreecommitdiff
path: root/roles/apps/coturn/templates/nginx-vhost.conf.j2
blob: 0639fbe158a4295a7cb33826efa5bb31b50bcaac (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
server {
    listen 80;
    listen [::]:80;
    server_name {{ coturn_hostnames | join(' ') }};

    include snippets/acmetool.conf;

    location / {
        return 301 https://$host$request_uri;
    }
}

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    server_name {{ coturn_hostnames | join(' ') }};

    include snippets/acmetool.conf;
    include snippets/tls.conf;
    ssl_certificate     /var/lib/acme/live/{{ coturn_hostnames[0] }}/fullchain;
    ssl_certificate_key /var/lib/acme/live/{{ coturn_hostnames[0] }}/privkey;
    include snippets/hsts.conf;

    location / {
        return 404;
    }
}