aboutsummaryrefslogtreecommitdiff
path: root/nginx.conf
blob: 82695fe6e8ee6b40195bb504848d535d6b27efad (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
server {
    listen 443 ssl;
    listen [::]:443 ssl;

    ssl_certificate /etc/letsencrypt/live/of.pipeframe.xyz/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/of.pipeframe.xyz/privkey.pem;

    server_name of.pipeframe.xyz;

    error_page 404 =404 @empty_json;
    error_page 403 =403 @empty_json;

    root /var/www/of-api;

    location / {
        try_files $uri $uri/ =404;
    }

    location @empty_json {
        return 404 "{}";
    }
}

server {
    listen 80;
    listen [::]:80;

    server_name of.pipeframe.xyz;
    return 301 https://of.pipeframe.xyz$request_uri;
}