forked from flatpak/flatpak.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
80 lines (69 loc) · 1.71 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
charset_types
text/css
text/plain
text/vnd.wap.wml
application/javascript
application/json
application/rss+xml
application/xml;
tcp_nopush on;
gzip on;
gzip_comp_level 5;
gzip_proxied any;
gzip_vary on;
gzip_types
application/atom+xml
application/javascript
application/json
application/ld+json
application/manifest+json
application/rss+xml
application/vnd.geo+json
application/vnd.ms-fontobject
application/x-font-ttf
application/x-web-app-manifest+json
application/xhtml+xml
application/xml
font/opentype
image/bmp
image/svg+xml
image/x-icon
text/cache-manifest
text/css
text/plain
text/vcard
text/vnd.rim.location.xloc
text/vtt
text/x-component
text/x-cross-domain-policy;
server {
listen 8080 default_server;
server_name _;
root /srv/http/;
try_files $uri $uri/ $uri.html =404;
error_page 404 /404.html;
absolute_redirect off;
rewrite ^/setup/(.*)/ https://flatpak.org/setup/$1;
location /apps.html {
return 301 https://flathub.org/;
}
location /developer.html {
return 301 http://docs.flatpak.org/en/latest/;
}
location /getting.html {
return 301 /setup/;
}
location /hello-world.html {
return 301 http://docs.flatpak.org/en/latest/getting-started.html;
}
location /runtimes.html {
return 301 http://docs.flatpak.org/en/latest/available-runtimes.html;
}
# Some flatpak images are compressed SVG files. Skip compressing
# them again but tell clients that they're already compressed since
# many browsers don't know that svgz is compressed.
location ~* \.svgz$ {
gzip off;
add_header Content-Encoding "gzip";
}
}