summaryrefslogtreecommitdiffstats
path: root/roles/wiki/files/etc/nginx/sites-available/website
blob: 2519286f2255dde28b0be915eb73e656b13fc3ad (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
server {
    listen      80;
    listen [::]:80;

    server_name     fripost.org;
    server_name www.fripost.org;

    include snippets/acme-challenge.conf;

    access_log /var/log/nginx/www.access.log;
    error_log  /var/log/nginx/www.error.log info;

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


server {
    listen      443;
    listen [::]:443;

    server_name     fripost.org;
    server_name www.fripost.org;

    include snippets/ssl.conf;
    ssl_certificate     /etc/nginx/ssl/www.fripost.org.chained.pem;
    ssl_certificate_key /etc/nginx/ssl/www.fripost.org.key;

    access_log /var/log/nginx/www.access.log;
    error_log  /var/log/nginx/www.error.log info;

    location / {
        try_files $uri $uri/ =404;
        index index.html;
        root /var/lib/ikiwiki/public_html/fripost-wiki/website;
    }
    location /static/ {
        alias /var/lib/ikiwiki/public_html/fripost-wiki/static/;
        expires 30d;
    }
    location /material/ {
        alias /var/www/fripost.org/material/;
        expires 30d;
    }
    location /minutes/ {
        alias /var/www/fripost.org/minutes/;
        expires 30d;
    }
    location /.well-known/autoconfig/ {
        alias /var/www/fripost.org/autoconfig/;
    }

    location = /ikiwiki.cgi {
        return 403;
    }
}