Skip to content

Commit

Permalink
更新nginx配置
Browse files Browse the repository at this point in the history
  • Loading branch information
shen100 committed May 17, 2017
1 parent 358f90c commit 2cfa502
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
4 changes: 2 additions & 2 deletions configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
},
"go": {
"Debug" : true, /*是否是debug模式*/
"UploadImgDir" : "/Users/liushen/dev/uploads/img", /*图片上传的目录*/
"ImgPath" : "/img", /*上传后的图片请求地址前缀*/
"UploadImgDir" : "/Users/liushen/dev/upload/img", /*图片上传的目录*/
"ImgPath" : "/upload/img", /*上传后的图片请求地址前缀*/
"Port" : 8012, /*go监听的端口*/
"SessionID" : "iris.sid", /*后台设置的session id*/
"MaxOrder" : 10000, /*最大的排序号*/
Expand Down
4 changes: 2 additions & 2 deletions configuration.prod.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
},
"go": {
"Debug" : true, /*是否是debug模式*/
"UploadImgDir" : "/Users/liushen/dev/uploads/img", /*图片上传的目录*/
"ImgPath" : "/img", /*上传后的图片请求地址前缀*/
"UploadImgDir" : "/data/web/up/upload/img", /*图片上传的目录*/
"ImgPath" : "/upload/img", /*上传后的图片请求地址前缀*/
"Port" : 8012, /*go监听的端口*/
"SessionID" : "iris.sid", /*后台设置的session id*/
"MaxOrder" : 10000, /*最大的排序号*/
Expand Down
7 changes: 6 additions & 1 deletion nginx/www.shen100.com.conf
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,12 @@ server {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

location ~ .*\.(gif|jpg|jpeg|bmp|png|ico|txt|js|css|eot|ttf|svg|woff|apk|jar|zip)$
location /upload {
root /data/web/up;
expires 365d;
}

location ~ ^(?!\/upload\/).+\.(gif|jpg|jpeg|bmp|png|swf|ico|txt|js|css|eot|ttf|svg|woff|apk|jar|zip)$
{
root /data/web/static;
expires 365d;
Expand Down

0 comments on commit 2cfa502

Please sign in to comment.