summaryrefslogtreecommitdiff
path: root/cyfraeviolae.conf
blob: a316753e38f9d193cec0e429b56e1b2d271f975a (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
68
69
70
71
72
73
74
server {
    server_name cyfraeviolae.org;

	location ~* \.(?:css|js|html|ico)$ {
        expires 1h;
        add_header Cache-Control "public";
	}

    location /forbidden-salamanders {
        proxy_pass http://127.0.0.1:9010/;
    }

    location /telechromy {
        alias /srv/telechromy/;
    }

    location /prosodyle {
        alias /srv/prosodyle/;
    }

    location /prosodyle/level-select {
        default_type "text/html";
        alias /srv/prosodyle/level-select.html;
    }

    location /well-ordered {
        alias /srv/well-ordered/;
    }

    location /sumcheck {
        proxy_pass http://127.0.0.1:9000;
    }

    location /antiquitysort {
        proxy_pass http://127.0.0.1:8090;
    }

    location /spectral-renga {
        proxy_pass http://127.0.0.1:8080;
    }

    location /git {
        alias /srv/git/;
        fastcgi_param SCRIPT_FILENAME /usr/lib/cgit/cgit.cgi;
        fastcgi_pass unix:/var/run/fcgiwrap.socket;
        fastcgi_split_path_info           ^(/git/?)(.+)$;
        fastcgi_param PATH_INFO $fastcgi_path_info;
        fastcgi_param QUERY_STRING $args;
    }

    location / {
        root /srv/cyfraeviolae;
    }

    error_page 404 /404.html;
    location = /404.html {
        root /srv/cyfraeviolae;
    }

    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/cyfraeviolae.org/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/cyfraeviolae.org/privkey.pem;
    include /etc/letsencrypt/options-ssl-nginx.conf;
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
}

server {
    if ($host = cyfraeviolae.org) {
        return 301 https://$host$request_uri;
    } # managed by Certbot
    server_name cyfraeviolae.org;
    listen 80;
    return 404;
}