nginx.d.conf.j2 886 Bytes
Newer Older
1
2
3
4
#
# {{ ansible_managed }}
#

5
6
7
8
9
10
server {
    listen       80;
    listen       [::]:80;
    server_name  {{ mirror_domain }};
    root         /srv/ftp;

11
    access_log   /var/log/nginx/{{ mirror_domain }}/access.log main;
12
13
    error_log    /var/log/nginx/{{ mirror_domain }}/error.log;

14
15
16
17
18
19
20
21
22
23
24
    include snippets/letsencrypt.conf;

    autoindex on;
}

server {
    listen       443 ssl http2;
    listen       [::]:443 ssl http2;
    server_name  {{ mirror_domain }};
    root         /srv/ftp;

25
    access_log   /var/log/nginx/{{ mirror_domain }}/access.log main;
26
27
    error_log    /var/log/nginx/{{ mirror_domain }}/error.log;

28
29
30
31
32
33
    ssl_certificate      /etc/letsencrypt/live/{{ mirror_domain }}/fullchain.pem;
    ssl_certificate_key  /etc/letsencrypt/live/{{ mirror_domain }}/privkey.pem;
    ssl_trusted_certificate /etc/letsencrypt/live/{{ mirror_domain }}/chain.pem;

    autoindex on;
}