-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
48 lines (39 loc) · 1.66 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
location = /404 {
rewrite ^(.*)$ /index.php?p=404 break;
}
location /vn {
rewrite ^(.*)$ /index.php?com=&lang=vn break;
}
location /us {
rewrite ^(.*)$ /index.php?com=&lang=us break;
}
location ~ ^/images/slides/(\d+)/(\d+)/(.*)$ {
try_files $uri $uri/ /img_data/images/$3;
}
location ~ ^/\w+/images/slides/(\d+)/(\d+)/(.*)$ {
try_files $uri $uri/ /img_data/images/$3;
}
location ~ ^/images/(\d+)/(\d+)/(\d+)/(.*)$ {
try_files $uri $uri/ /thumb.php?w=$1&h=$2&pid=$3&src=http://$host/img_data/images/$4&$args;
}
location ~ ^/images/(\d+)/(\d+)/(.*)$ {
try_files $uri $uri/ /thumb.php?w=$1&h=$2&src=http://$host/img_data/images/$3&$args;
}
location ~ ^/(\w+)/images/(\d+)/(\d+)/(\d+)/(.*)$ {
try_files $uri $uri/ /thumb.php?site=$1&w=$2&h=$3&pid=$4&src=http://$host/img_data/images/$5&$args;
}
location ~ ^/(\w+)/images/(\d+)/(\d+)/(.*)$ {
try_files $uri $uri/ /thumb.php?site=$1&w=$2&h=$3&src=http://$host/img_data/images/$4&$args;
}
location / {
rewrite ^/([^/]*).html$ /index.php?com=$1;
rewrite ^/([^/]*)/([^/]*).html$ /index.php?com=$1&alias=$2 break;
rewrite ^/([^/]*)/([^/]*).html(.*)$ /index.php?com=$1&alias=$2&page=$3 break;
rewrite ^/([^/]*)/([^/]*)/([^/]*).html$ /index.php?com=$1&alias=$2&alias1=$3 break;
rewrite ^/([^/]*)/([^/]*)/([^/]*).html(.*)$ /index.php?com=$1&alias=$2&alias1=$3&page=$4 break;
}
location = /robots.txt { access_log off; log_not_found off; }
location = /favicon.ico { access_log off; log_not_found off; expires 30d; }
location ~ /\. { access_log off; log_not_found off; deny all; }
location ~ ~$ { access_log off; log_not_found off; deny all; }
location ~ /\.git { access_log off; log_not_found off; deny all; }