-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathm_tmpl.conf
50 lines (40 loc) · 1019 Bytes
/
m_tmpl.conf
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
# Krot mirrors
server {
listen 80;
listen [::]:80;
server_name @mirrors@;
rewrite ^/(.*)/$ /$1 permanent;
charset UTF-8;
location / {
proxy_cache cache;
proxy_cache_valid 10m;
proxy_cache_valid 404 1m;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_redirect off;
location ~ ^/(auth|admin) {
return 301 https://krot.me$request_uri;
}
proxy_pass http://127.0.0.1:3000;
}
location ~* \.(?:jpe?g|gif|png|mp4|svg|pdf|ico|css|js|map|zip|app|otf|ttf|woff|woff2|eot|html|txt)$ {
access_log off;
error_log off;
root /var/krot/public;
}
location ~ \.php$ {
access_log off;
error_log off;
return 404;
}
}
server {
listen 80;
listen [::]:80;
server_name @www_mirrors@;
return 301 http://$hostname$request_uri;
}