summaryrefslogtreecommitdiffstats
path: root/templates/reprepro/snapshots/time_based/nginx_site.erb
blob: 91a23d095a125768d3c8538adec09f91ab8ec2dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# This file is managed by the tails Puppet module.

server {
    server_name <%= @web_hostname %>;
    listen      <%= @web_port %>;
    root        <%= @homedir %>/repositories;

    autoindex on;

    location ~ /(conf|db|incoming|logs|tmp)/ {
        deny all;
    }

    location ~ ^/[a-z-]+/project/trace/[a-z-]+$ {
        default_type text/plain;
    }

    # Map URL namespace to filesystem namespace
    rewrite ^/([a-z-]+)/([0-9]+)/dists/([^/]+(?:/updates)?)/(.*)$ /$1/dists/$3/snapshots/$2/$4 permanent;
    rewrite ^/([a-z-]+)/[0-9]+/pool/(.*)$ /$1/pool/$2 permanent;

}