forked from RestyaPlatform/board
-
Notifications
You must be signed in to change notification settings - Fork 0
/
restyaboard.conf
48 lines (40 loc) · 1.41 KB
/
restyaboard.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
server {
listen 80 default_server;
server_name _;
root /usr/share/nginx/html;
index index.html index.php;
gzip on;
gzip_disable "msie6";
gzip_comp_level 6;
# gzip_comp_level 9;
gzip_min_length 1100;
gzip_buffers 16 8k;
gzip_proxied any;
# gzip_http_version 1.1;
gzip_types text/plain application/xml text/css text/js text/xml application/x-javascript text/javascript application/json application/xml+rss;
client_max_body_size 300M;
rewrite ^/download/([0-9]*)/([a-zA-Z0-9_\.]*)$ /server/php/R/download.php?id=$1&hash=$2 last;
rewrite ^/ical/([0-9]*)/([a-z0-9]*).ics$ /server/php/R/ical.php?id=$1&hash=$2 last;
rewrite ^/api/(.*)$ /server/php/R/r.php?_url=$1&$args last;
location / {
root /usr/share/nginx/html/client;
}
location ~ \.php$ {
try_files $uri =404;
include fastcgi_params;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PHP_VALUE "upload_max_filesize = 300M \n post_max_size=301M";
}
location ~* \.(css|js|less|html|ttf|woff|jpg|jpeg|gif|png|bmp|ico) {
root /usr/share/nginx/html/client;
if (-f $request_filename) {
break;
}
rewrite ^/img/([a-zA-Z_]*)/([a-zA-Z_]*)/([a-zA-Z0-9_\.]*)$ /server/php/R/image.php?size=$1&model=$2&filename=$3 last;
add_header Cache-Control public;
add_header Cache-Control must-revalidate;
expires 7d;
}
}