aboutsummaryrefslogtreecommitdiff
path: root/nginx/conf/nginx.conf
blob: 9a4d6e642463464aed2f66cd32226e2386e1a22a (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
daemon off;
error_log /dev/stdout info;

events {
}

http {
  access_log /dev/stdout;

  upstream nar-herder {
    server 127.0.0.1:8080;
  }

  server {
    listen       8081;

    location ~ \.narinfo$ {
      proxy_pass http://nar-herder;
    }

    location ~ ^/nar/(.*)$ {
      proxy_pass http://nar-herder;
    }

    location = /latest-database-dump {
      proxy_pass http://nar-herder;
    }

    location ~ ^/internal/database/(.*)$ {
      internal;
      alias $1;
    }

    location ~ ^/internal/nar/(.*)$ {
      internal;
      alias storage/nar/$1;
    }
  }
}