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

    server_name fripost.org;

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

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


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

    server_name fripost.org;

    include ssl/config;
    # include the intermediate certificate, see
    # - https://www.ssllabs.com/ssltest/analyze.html?d=fripost.org
    # - http://nginx.org/en/docs/http/configuring_https_servers.html
    ssl_certificate     /etc/nginx/ssl/fripost.org.chained.pem;
    ssl_certificate_key /etc/nginx/ssl/fripost.org.key;

    access_log /var/log/nginx/access.log;
    error_log  /var/log/nginx/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/;
    }

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