-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
88 lines (76 loc) · 1.98 KB
/
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
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
map $http_accept_language $lang {
default en;
~^cs cs;
~^de-ch de-CH;
~^de-CH de-CH;
~^de de;
~^el el;
~^en en;
~^es es;
~^fr fr;
~^hi hi;
~^in in;
~^it it;
~^ja ja;
~^ko ko;
~^ms ms;
~^nl nl;
~^pl pl;
~^pt-br pt-BR;
~^pt-BR pt-BR;
~^pt-pt pt-PT;
~^pt-PT pt-PT;
~^pt pt-BR;
~^tr tr;
~^vi vi;
~^zh-cn zh-CN;
~^zh-CN zh-CN;
~^zh-tw zh-TW;
~^zh-TW zh-TW;
~^zh zh-CN;
}
server {
listen 80;
server_name bitcoincash.org;
error_page 404 /404.html;
error_page 403 /403.html;
if ( $http_host = 'bitcoincash.org' ){
return 301 https://www.bitcoincash.org$request_uri;
}
if ( $http_x_forwarded_proto = 'http' ) {
return 301 https://$host$request_uri;
}
rewrite ^/letter-from-the-ceo.pdf$ https://falkvinge.net/wp-content/uploads/2017/11/letter-from-the-ceo.pdf permanent;
root /usr/share/nginx/html;
location /robots.txt {
alias /usr/share/nginx/html/robots/robots.txt;
}
location ~* "^/(([a-z]{2})(-[a-z]{2})?)/graphics/?$" {
return 302 $scheme://$http_host/$1/graphics.html;
}
location = "/graphics/" {
return 302 $scheme://$http_host/graphics.html;
}
location ~* \.(jpg|jpeg|png|gif|ico)$ {
expires 30d;
}
location ~* \.(css|js)$ {
expires 1d;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
## Compression.
gzip on;
gzip_buffers 16 8k;
gzip_comp_level 1;
gzip_http_version 1.1;
gzip_min_length 10;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/x-icon application/vnd.ms-fontobject font/opentype application/x-font-ttf;
gzip_vary on;
gzip_proxied any; # Compression for all requests.
## No need for regexps. See
## http://wiki.nginx.org/NginxHttpGzipModule#gzip_disable
gzip_disable msie6;