-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnginx.conf
86 lines (73 loc) · 2.05 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
server {
listen 80;
server_name filelib-examples.tunk.io;
root /wwwroot/xi-filelib-examples/web;
index index.php;
gzip on;
gzip_comp_level 1;
gzip_http_version 1.1;
gzip_vary On;
gzip_proxied any;
gzip_types text/plain text/css text/xml application/xml application/xml+rss application/xml+atom text/javascript application/x-javascript application/javascript application/json;
gzip_disable "MSIE [1-6]\.";
# lazy files are catched and forwarded to backend when not found
location ~* ^/lazy-files/.+\.(jpg|jpeg|gif|png|ico)$ {
access_log off;
gzip off;
expires 30d;
try_files $uri /lazy-publisher-renderer.php;
}
# Handle Static Content Here
location ~* ^.+\.(jpg|jpeg|gif|png|ico)$ {
access_log off;
gzip off;
expires 30d;
}
# Handle Gzipped Static Content Here
location ~* ^.+\.(svg)$ {
access_log off;
gzip on;
expires 30d;
}
# Documents
location ~* ^.+\.(css|js|html|txt|xml)$ {
access_log off;
expires 30d;
gzip on;
}
# Web fonts, gzipped
location ~* ^.+\.(eot|ttf|otf)$ {
access_log off;
gzip on;
expires 30d;
add_header Access-Control-Allow-Origin *;
}
# Web fonts, not gzipped
location ~* ^.+\.(woff)$ {
access_log off;
gzip on;
expires 30d;
add_header Access-Control-Allow-Origin *;
}
# archives
location ~* ^.+\.(pdf|gz|bz2|exe|rar|zip|7z)$ {
access_log off;
gzip off;
}
# video
location ~* ^.+\.(mp4|webm|ogv|ogg)$ {
access_log off;
gzip off;
}
location /protected {
internal;
alias /wwwroot/xi-filelib/docs/html/data/private/;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
}
}