Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYWAP
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
梁志锋
9 years ago
Commit
bc821efaefa8f5ccbf4b648ae3fe56a64609d2b1
1 parent
561b396c
修改nginx后进行归档。
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
22 deletions
library/WebPlugin/Cache.php
script/nginx/conf/vhosts/nginx.rls.yohobuy.https.conf
yohobuy/www.yohobuy.com/application/models/Index/Home.php
library/WebPlugin/Cache.php
View file @
bc821ef
...
...
@@ -41,7 +41,7 @@ class Cache
if
(
DIRECTORY_SEPARATOR
===
'\\'
)
{
HoodCache
::
Memcache
(
'master'
)
->
set
(
self
::
makeKey
(
$key
,
'master'
),
$value
,
$expire
);
HoodCache
::
Memcache
(
'slave'
)
->
set
(
self
::
makeKey
(
$key
,
'slave'
),
$value
,
86400
);
// 二级缓存1天
}
}
// LINUX
else
{
HoodCache
::
Memcached
(
'master'
)
->
set
(
self
::
makeKey
(
$key
,
'master'
),
$value
,
$expire
);
...
...
script/nginx/conf/vhosts/nginx.rls.yohobuy.https.conf
View file @
bc821ef
...
...
@@ -40,7 +40,7 @@ server
#srp 62a165d59f8daf42e2df5f3c5aed8a2f krp:17d7a40f313560d4d9a1189a91e45ab9
#boc 94931e4a3036baeecdacb975e10a8ec6 bcc:dc9262a469f6f315f74c087a7b3a7f35
default_type
application
/
json
;
return
200
'{"code":200,"message":"Config Success","md5":"e4567a9039add2978bf5b49550572cff","data":{"
ae":"e0323a9039add2978bf5b49550572c7c","url":"http://m.yohobuy.com","tl":"352f028bd6ecf28de1c285c573642659
"}}'
;
return
200
'{"code":200,"message":"Config Success","md5":"e4567a9039add2978bf5b49550572cff","data":{"
bd":”b98d50c159a938723d8eb8f3039afab2","ae":"e0323a9039add2978bf5b49550572c7c","url":"http://m.yohobuy.com","tl":"352f028bd6ecf28de1c285c573642659","dl":"2a90dfa0f37b92aaebf369e9a4d38ba4
"}}'
;
}
location
=/
hf
/
v1
{
proxy_redirect
off
;
...
...
@@ -290,6 +290,16 @@ server
return
301
https
://$
host
$
request_uri
;
}
location
^~ /
share_
{
access_log
/
Data
/
logs
/
access
.
m
.
yohobuy
.
com
.
log
fenxi
;
proxy_redirect
off
;
proxy_pass
http
://
172
.
31
.
55
.
18
;
proxy_set_header
Host
m
.
yohobuy
.
com
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
proxy_set_header
X
-
Forwarded
-
For
$
proxy_add_x_forwarded_for
;
proxy_set_header
Accept
-
Encoding
"gzip"
;
}
#for wechat pay
location
^~ /
home
/
orders
/
pay
{
proxy_redirect
off
;
...
...
@@ -369,21 +379,6 @@ server
}
}
#server
#{
# listen 80;
# server_name sale.m.yohobuy.com;
# access_log /Data/logs/access.m.yohobuy.com.log fenxi;
# location / {
# proxy_redirect off;
# proxy_pass http://172.31.55.18;
# proxy_set_header Host sale.m.yohobuy.com;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header Accept-Encoding "gzip";
# }
#
#}
server
{
...
...
@@ -457,7 +452,7 @@ server
#srp 62a165d59f8daf42e2df5f3c5aed8a2f krp:17d7a40f313560d4d9a1189a91e45ab9
#boc 94931e4a3036baeecdacb975e10a8ec6 bcc:dc9262a469f6f315f74c087a7b3a7f35
default_type
application
/
json
;
return
200
'{"code":200,"message":"Config Success","md5":"e4567a9039add2978bf5b49550572cff","data":{"
ae":"e0323a9039add2978bf5b49550572c7c","url":"http://m.yohobuy.com","tl":"352f028bd6ecf28de1c285c573642659
"}}'
;
return
200
'{"code":200,"message":"Config Success","md5":"e4567a9039add2978bf5b49550572cff","data":{"
bd":”b98d50c159a938723d8eb8f3039afab2","ae":"e0323a9039add2978bf5b49550572c7c","url":"http://m.yohobuy.com","tl":"352f028bd6ecf28de1c285c573642659","dl":"2a90dfa0f37b92aaebf369e9a4d38ba4
"}}'
;
}
location
=/
hf
/
v1
{
proxy_redirect
off
;
...
...
@@ -553,9 +548,7 @@ server
proxy_set_header
X
-
Forwarded
-
For
$
proxy_add_x_forwarded_for
;
proxy_set_header
Accept
-
Encoding
"gzip"
;
}
#location ^~ /home/message {
# return 301 http://m.yohobuy.com$request_uri;
#}
location
^~ /
home
/
lottery
{
access_log
/
Data
/
logs
/
access
.
m
.
yohobuy
.
com
.
log
fenxi
;
proxy_redirect
off
;
...
...
@@ -720,6 +713,15 @@ server
return
301
https
://$
host
$
request_uri
;
}
location
^~ /
share_
{
access_log
/
Data
/
logs
/
access
.
m
.
yohobuy
.
com
.
log
fenxi
;
proxy_redirect
off
;
proxy_pass
http
://
172
.
31
.
55
.
18
;
proxy_set_header
Host
m
.
yohobuy
.
com
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
proxy_set_header
X
-
Forwarded
-
For
$
proxy_add_x_forwarded_for
;
proxy_set_header
Accept
-
Encoding
"gzip"
;
}
#for we chat pay
location
=/
home
/
orders
/
pay
{
return
301
http
://$
host
$
request_uri
;
...
...
yohobuy/www.yohobuy.com/application/models/Index/Home.php
View file @
bc821ef
...
...
@@ -162,7 +162,7 @@ class HomeModel
*/
public
static
function
setSwitchToCookie
(
$cookie
)
{
setcookie
(
'_Channel'
,
$cookie
,
time
()
+
86400
*
300
,
'/'
,
COOKIE_DOMAIN
);
setcookie
(
'_Channel'
,
$cookie
,
time
()
+
86400
*
300
,
'/'
,
COOKIE_DOMAIN
);
}
/**
...
...
Please
register
or
login
to post a comment