summaryrefslogtreecommitdiffstats
path: root/roles/reverseproxy/templates/Caddyfile.j2
blob: 753c63d2cff3fba0d2e4e799d542a7624787a3d9 (plain)
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
{% for item in domainhttps %}
{{ item }} {
    tls {{ email }}
    gzip
    log {{ item }}_access.log {
            rotate_size 1
            rotate_keep 10
    }
    errors {{ item }}_error.log {
            rotate_size 1
            rotate_keep 10
    }
}
{% endfor %}

{% if outdoor is defined %}
{% for item in publicstatic %}
{{ item }} {
    tls {{ email }}
    gzip
    log {{ item }}_access.log {
            rotate_size 1
            rotate_keep 10
    }
    errors {{ item }}_error.log {
            rotate_size 1
            rotate_keep 10
    }
}
{% endfor %}

{% for item in publicredir %}
{{ item }} {
    tls {{ email }}
    gzip
    log {{ item }}_access.log {
            rotate_size 1
            rotate_keep 10
    }
    errors {{ item }}_error.log {
            rotate_size 1
            rotate_keep 10
    }
    redir https://{{ redirection }}{uri}
}
{% endfor %}

{% for item in publicreverse %}
{{ item }} {
    tls {{ email }}
    gzip
    log {{ item }}_access.log {
        rotate_size 1
        rotate_keep 10
    }
    errors {{ item }}_error.log {
        rotate_size 1
        rotate_keep 10
    }
    proxy / https://{{ backendhost }}:{{ backendport }} {
        transparent
        insecure_skip_verify
        max_fails 60
    }
}
{% endfor %}
{% endif %}