-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathnginx.conf
More file actions
63 lines (49 loc) · 1.3 KB
/
nginx.conf
File metadata and controls
63 lines (49 loc) · 1.3 KB
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
gzip on;
gzip_proxied any;
gzip_types text/plain text/xml text/css application/x-javascript;
gzip_vary on;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
font/ttf ttf
font/otf otf
application/vnd.ms-fontobject eot;
application/x-font-ttf ttf;
application/font-woff woff;
application/font-woff2 woff2;
location ~* \.(eot|otf|ttf|woff|woff2)$ {
add_header Access-Control-Allow-Origin *;
}
location / {
autoindex off;
}
# BEGIN URL rewrite
if ($http_accept_encoding ~ "gzip"){
set $rule_0 1$rule_0;
}
if ($request_filename ~ ".(js|css)$"){
set $rule_0 2$rule_0;
}
if (-f $request_filename.gz){
set $rule_0 3$rule_0;
}
if ($rule_0 = "321"){
rewrite ^/(.*)$ /$1.gz last;
}
if (!-d $request_filename){
set $rule_1 1$rule_1;
}
if (!-f $request_filename){
set $rule_1 2$rule_1;
}
if ($rule_1 = "21"){
rewrite ^/(.*)$ /?{QUERY_STRING};
}
# END URL rewrite
# XSS protection
#add_header x-xss-protection "1; mode=block" always;
# Nosnif
#add_header X-Content-Type-Options "nosniff" always;
# Iframes only from self
#add_header x-frame-options "SAMEORIGIN" always;
# Php config
# This should be removed from here and adjusted in the php.ini file
fastcgi_param PHP_VALUE "upload_max_filesize=40M \n post_max_size=40M \n max_input_time=300 \n max_execution_time=300";