Commit 2cfa502 1 parent 358f90c commit 2cfa502 Copy full SHA for 2cfa502
File tree 3 files changed +10
-5
lines changed
3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 27
27
},
28
28
"go" : {
29
29
"Debug" : true , /*是否是debug模式*/
30
- "UploadImgDir" : " /Users/liushen/dev/uploads /img" , /*图片上传的目录*/
31
- "ImgPath" : " /img" , /*上传后的图片请求地址前缀*/
30
+ "UploadImgDir" : " /Users/liushen/dev/upload /img" , /*图片上传的目录*/
31
+ "ImgPath" : " /upload/ img" , /*上传后的图片请求地址前缀*/
32
32
"Port" : 8012 , /*go监听的端口*/
33
33
"SessionID" : " iris.sid" , /*后台设置的session id*/
34
34
"MaxOrder" : 10000 , /*最大的排序号*/
Original file line number Diff line number Diff line change 27
27
},
28
28
"go" : {
29
29
"Debug" : true , /*是否是debug模式*/
30
- "UploadImgDir" : " /Users/liushen/dev/uploads /img" , /*图片上传的目录*/
31
- "ImgPath" : " /img" , /*上传后的图片请求地址前缀*/
30
+ "UploadImgDir" : " /data/web/up/upload /img" , /*图片上传的目录*/
31
+ "ImgPath" : " /upload/ img" , /*上传后的图片请求地址前缀*/
32
32
"Port" : 8012 , /*go监听的端口*/
33
33
"SessionID" : " iris.sid" , /*后台设置的session id*/
34
34
"MaxOrder" : 10000 , /*最大的排序号*/
Original file line number Diff line number Diff line change @@ -33,7 +33,12 @@ server {
33
33
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
34
34
}
35
35
36
- location ~ .*\.(gif|jpg|jpeg|bmp|png|ico|txt|js|css|eot|ttf|svg|woff|apk|jar|zip)$
36
+ location /upload {
37
+ root /data/web/up;
38
+ expires 365d;
39
+ }
40
+
41
+ location ~ ^(?!\/upload\/).+\.(gif|jpg|jpeg|bmp|png|swf|ico|txt|js|css|eot|ttf|svg|woff|apk|jar|zip)$
37
42
{
38
43
root /data/web/static;
39
44
expires 365d;
You can’t perform that action at this time.
0 commit comments