-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathnginx.conf
24 lines (23 loc) · 840 Bytes
/
nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
server {
include http-listeners;
include wellknown_location;
server_name kernels.archzfs.com;
root /var/www/kernels.archzfs.com/htdocs;
location ~ "^/(archzfs-kernels/)?(x86_64/)?archzfs-kernels.db$" {
return 410;
}
location ~ ^/(x86_64/)?(?<fn>(?<pn>(?<fl>.).+?)-[0-9].+pkg\.tar.+)$ {
rewrite ^(.*) https://archive.archlinux.org/packages/$fl/$pn/$fn permanent;
}
location ~ ^/(x86_64/)?[a-z-]+/(?<fn>(?<pn>(?<fl>.).+?)-[0-9].+pkg\.tar.+)$ {
rewrite ^(.*) https://archive.archlinux.org/packages/$fl/$pn/$fn permanent;
}
location = / {
rewrite ^(.*) https://end.re/blog/ebp036_archzfs-repo-for-kernels/ permanent;
}
error_page 410 /410.html;
access_log /var/www/kernels.archzfs.com/logs/access.log csv-http;
add_header X-Thanks "for bothering to look at my HTTP headers";
add_header X-Answer "42";
charset utf-8;
}