Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
梁志锋
9 years ago
Commit
ab4a5f388bd1a57917e8ab12ce3f7404540eef8e
1 parent
68f3f0af
nginx修改备份
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
245 additions
and
124 deletions
script/nginx/conf/vhost/production/location/yohobuypc_httpskey.conf
script/nginx/conf/vhost/production/location/yohobuypc_idc.conf
script/nginx/conf/vhost/production/location/yohobuypc_node.conf
script/nginx/conf/vhost/production/location/yohobuypc_php.conf
script/nginx/conf/vhost/production/location/yohobuypc_static.conf
script/nginx/conf/vhost/production/yohobuypc.conf
script/nginx/conf/vhost/testing/location/yohobuypc_node.conf
script/nginx/conf/vhost/production/location/yohobuypc_httpskey.conf
View file @
ab4a5f3
ssl
on
;
ssl_dhparam
/
Data
/
local
/
nginx
-
1
.
8
.
0
/
conf
/
ssl
/
pc
/
server
.
pem
;
ssl_dhparam
/
Data
/
local
/
nginx
-
1
.
8
.
0
/
conf
/
ssl
/
dhparam
.
pem
;
# ssl_dhparam /Data/local/nginx-1.8.0/conf/ssl/pc/server.pem;
ssl_prefer_server_ciphers
on
;
ssl_protocols
TLSv1
TLSv1
.
1
TLSv1
.
2
;
ssl_ciphers
"ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:AES128-GCM-SHA256:AES256-GCM-SHA384:DES-CBC3-SHA"
;
ssl_session_tickets
off
;
ssl_session_cache
shared
:
SSL
:
10
m
;
\ No newline at end of file
ssl_session_cache
shared
:
SSL
:
10
m
;
...
...
script/nginx/conf/vhost/production/location/yohobuypc_idc.conf
View file @
ab4a5f3
## old idc
location
^~ /
passport
/
auth
/
signin
{
#old idc
# location = /erp2goods {
# proxy_redirect off;
# proxy_pass http://yohobuy-old-www;
# proxy_set_header Host $host;
# 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";
# }
location
= /
passport
/
auth
/
signin
{
proxy_redirect
off
;
proxy_pass
http
://
yohobuy
-
old
-
www
;
proxy_set_header
Host
$
host
;
...
...
@@ -9,7 +19,7 @@
proxy_set_header
Accept
-
Encoding
"gzip"
;
}
location
^~
/
live
/
index
{
location
=
/
live
/
index
{
proxy_redirect
off
;
proxy_pass
http
://
yohobuy
-
old
-
www
;
proxy_set_header
Host
$
host
;
...
...
@@ -19,7 +29,13 @@
}
location
= /
yohoshow
{
return
301
http
://$
host
;
# proxy_redirect off;
# proxy_pass http://yohobuy-old-www;
# proxy_set_header Host $host;
# 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";
return
301
http
://$
host
;
}
location
=/
product
/
specials
{
...
...
@@ -51,17 +67,17 @@
rewrite
^/
logout_
(.+).
html
http
://
www
.
yohobuy
.
com
/
logout
.
html
?
token
=$
1
;
}
location
^~ /
product
/
pro_
{
location
^~ /
product
/
pro_
{
return
301
http
://
item
.
yohobuy
.
com
$
request_uri
;
}
location
= /
sale
{
rewrite
/
sale
http
://
www
.
yohobuy
.
com
/
product
/
sale
/
permanent
;
location
= /
sale
{
rewrite
/
sale
http
://
www
.
yohobuy
.
com
/
product
/
sale
/
permanent
;
}
location
^~ /
brands
/ {
rewrite
/
brands
/$
http
://
www
.
yohobuy
.
com
/
brands
permanent
;
}
#location ^~ /brands/ {
# rewrite /brands/$ http://www.yohobuy.com/brands permanent;
#}
location
^~ /
discount
{
rewrite
/
discount
http
://
search
.
yohobuy
.
com
permanent
;
}
...
...
@@ -88,4 +104,14 @@
location
^~ /
product
/
exhibit
{
rewrite
/
product
/
exhibit
http
://
www
.
yohobuy
.
com
permanent
;
}
\ No newline at end of file
}
location
^~ /
Passport
/
session
/
index
{
proxy_redirect
off
;
proxy_pass
http
://
yohobuy
-
old
-
www
;
proxy_set_header
Host
$
host
;
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"
;
}
\ No newline at end of file
...
...
script/nginx/conf/vhost/production/location/yohobuypc_node.conf
View file @
ab4a5f3
location
^~ /
passport
/
autosign
/
wechat
/ {
proxy_redirect
off
;
proxy_pass
http
://
yohobuy
-
node
;
proxy_set_header
Host
$
host
;
proxy_set_header
X
-
Forwarded
-
For
$
proxy_add_x_forwarded_for
;
proxy_set_header
Accept
-
Encoding
"gzip"
;
}
location
^~ /
passport
/
login
/
wechat
/ {
proxy_redirect
off
;
proxy_pass
http
://
yohobuy
-
node
;
proxy_set_header
Host
$
host
;
proxy_set_header
X
-
Forwarded
-
For
$
proxy_add_x_forwarded_for
;
proxy_set_header
Accept
-
Encoding
"gzip"
;
}
location
^~ /
product
/
sale
/ {
proxy_redirect
off
;
proxy_pass
http
://
yohobuy
-
node
;
proxy_set_header
Host
$
host
;
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"
;
}
location
= /
product
/
index
/
getNodeContent
{
proxy_redirect
off
;
proxy_pass
http
://
yohobuy
-
node
;
proxy_set_header
Host
$
host
;
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"
;
}
location
^~ /
product
/
outlets
/ {
proxy_redirect
off
;
proxy_pass
http
://
yohobuy
-
node
;
proxy_set_header
Host
$
host
;
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"
;
}
location
^~ /
product
/
sale
/ {
proxy_redirect
off
;
proxy_pass
http
://
yohobuy
-
node
;
proxy_set_header
Host
$
host
;
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"
;
}
location
= /
passport
/
autosign
/
wechat
{
proxy_redirect
off
;
proxy_pass
http
://
yohobuy
-
node
;
proxy_set_header
Host
$
host
;
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"
;
}
location
^~ /
product
/
outlets
/ {
proxy_redirect
off
;
proxy_pass
http
://
yohobuy
-
node
;
proxy_set_header
Host
$
host
;
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"
;
}
location
^~ /
passport
/
login
/
wechat
/ {
proxy_redirect
off
;
proxy_pass
http
://
yohobuy
-
node
;
proxy_set_header
Host
$
host
;
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"
;
}
# location ^~ /sale/ {
# proxy_redirect off;
# proxy_pass http://yohobuy-node;
# proxy_set_header Host $host;
# 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";
# }
#location = /product/index/getNodeContent {
# proxy_redirect off;
# proxy_pass http://yohobuy-node;
# proxy_set_header Host $host;
# 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";
# }
...
...
script/nginx/conf/vhost/production/location/yohobuypc_php.conf
View file @
ab4a5f3
#SEO optimization
#SEO optimization
if
($
host
~* ^
www
\.(.*)\.
yohobuy
\.
com
) {
set
$
sub_name
$
1
;
return
301
$
scheme
://$
sub_name
.
yohobuy
.
com
$
request_uri
;
...
...
@@ -20,4 +20,14 @@
proxy_set_header
Host
service
.
yoho
.
cn
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
proxy_set_header
X
-
Forwarded
-
For
$
proxy_add_x_forwarded_for
;
}
location
^~ /
brands
{
proxy_redirect
off
;
proxy_pass
http
://
yohobuy
-
pc
;
proxy_set_header
Host
$
host
;
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"
;
}
\ No newline at end of file
...
...
script/nginx/conf/vhost/production/location/yohobuypc_static.conf
View file @
ab4a5f3
...
...
@@ -8,7 +8,7 @@
expires
1
d
;
}
##百度站长的校验文件, 百度站长账号feng322169 密码yoho9646
##百度站长的校验文件, 百度站长账号feng322169 密码yoho9646
location
= /
baidu_verify_Mrj1Pt3L86
.
html
{
root
/
Data
/
PE
/
yohobuy_pc
/
assets
;
expires
7
d
;
...
...
script/nginx/conf/vhost/production/yohobuypc.conf
View file @
ab4a5f3
server
{
listen
80
;
server_name
*.
yohobuy
.
com
;
server_name
www
.
yohobuy
.
com
*.
yohobuy
.
com
;
root
/
Data
/
code
/
git
/
web
/
yohobuy
/
yohobuy
/
www
.
yohobuy
.
com
/
public
;
access_log
/
Data
/
logs
/
nginx
/
access_pc
.
yohobuy
.
com
.
log
fenxi
;
error_log
/
Data
/
logs
/
error
.
pc
.
yohobuy
.
com
.
log
warn
;
error_log
/
Data
/
logs
/
error
_
pc
.
yohobuy
.
com
.
log
warn
;
# static file
include
vhosts
/
location
/
yohobuypc_static
.
conf
;
...
...
@@ -16,6 +16,10 @@ server
# php
include
vhosts
/
location
/
yohobuypc_php
.
conf
;
# node
include
vhosts
/
location
/
yohobuypc_node
.
conf
;
location
= /
index
.
html
{
return
301
http
://
www
.
yohobuy
.
com
/;
}
...
...
@@ -24,16 +28,68 @@ server
rewrite
/
resource
/
getbanner
(.*)$
https
://
www
.
yohobuy
.
com
/
common
/
getbanner
$
1
permanent
;
}
# others http 301 redirect https
location
~* /
special_
(\
d
+)
_
(.*)\.
html
$ {
proxy_redirect
off
;
proxy_pass
http
://
yohobuy
-
old
-
www
;
proxy_set_header
Host
$
host
;
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"
;
}
location
~* /
special
/(\
d
+)
_
(.*)\.
html
$ {
proxy_redirect
off
;
proxy_pass
http
://
yohobuy
-
node
;
proxy_set_header
Host
$
host
;
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"
;
}
#https flag, 1 means HTTPS, 0 means HTTP
set
$
httpsFlag
1
;
location
/ {
if
($
httpsFlag
=
1
) {
return
301
https
://$
host
$
request_uri
;
}
proxy_redirect
off
;
proxy_pass
http
://
yohobuy
-
pc
;
proxy_set_header
Host
$
host
;
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
{
listen
80
;
listen
443
ssl
;
ssl_certificate
/
Data
/
local
/
nginx
-
1
.
8
.
0
/
conf
/
ssl
/
pc
/
server
.
pem
;
ssl_certificate_key
/
Data
/
local
/
nginx
-
1
.
8
.
0
/
conf
/
ssl
/
pc
/
server
.
key
;
server_name
list
.
yohobuy
.
com
item
.
yohobuy
.
com
sale
.
yohobuy
.
com
new
.
yohobuy
.
com
search
.
yohobuy
.
com
guang
.
yohobuy
.
com
shop
.
yohobuy
.
com
;
# https key
include
vhosts
/
location
/
yohobuypc_httpskey
.
conf
;
location
/ {
return
301
https
://$
host
$
request_uri
;
proxy_redirect
off
;
proxy_pass
http
://
yohobuy
-
pc
;
proxy_set_header
Host
$
host
;
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
{
listen
443
;
server_name
*.
yohobuy
.
com
;
server_name
www
.
yohobuy
.
com
*.
yohobuy
.
com
;
ssl_certificate
/
Data
/
local
/
nginx
-
1
.
8
.
0
/
conf
/
ssl
/
pc
/
server
.
pem
;
ssl_certificate_key
/
Data
/
local
/
nginx
-
1
.
8
.
0
/
conf
/
ssl
/
pc
/
server
.
key
;
...
...
@@ -41,7 +97,10 @@ server
root
/
Data
/
code
/
git
/
web
/
yohobuy
/
yohobuy
/
www
.
yohobuy
.
com
/
public
;
access_log
/
Data
/
logs
/
nginx
/
access_pc
.
yohobuy
.
com
.
log
fenxi
;
error_log
/
Data
/
logs
/
error
.
pc
.
yohobuy
.
com
.
log
warn
;
error_log
/
Data
/
logs
/
error_pc
.
yohobuy
.
com
.
log
warn
;
# https key
include
vhosts
/
location
/
yohobuypc_httpskey
.
conf
;
# static file
include
vhosts
/
location
/
yohobuypc_static
.
conf
;
...
...
@@ -52,21 +111,38 @@ server
# php
include
vhosts
/
location
/
yohobuypc_php
.
conf
;
# node
include
vhosts
/
location
/
yohobuypc_node
.
conf
;
location
~* /
special_
(\
d
+)
_
(.*)\.
html
$ {
return
301
http
://$
host
$
request_uri
;
}
location
~* /
special
/(\
d
+)
_
(.*)\.
html
$ {
return
301
http
://$
host
$
request_uri
;
}
location
= /
index
.
html
{
return
301
http
s
://
www
.
yohobuy
.
com
/;
return
301
http
://
www
.
yohobuy
.
com
/;
}
location
^~ /
resource
/
getbanner
{
rewrite
/
resource
/
getbanner
(.*)$
https
://
www
.
yohobuy
.
com
/
common
/
getbanner
$
1
permanent
;
}
location
/ {
proxy_redirect
off
;
proxy_pass
http
://
yohobuy
-
pc
;
proxy_set_header
Host
$
host
;
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"
;
#https flag, 1 means HTTPS, 0 means HTTP
set
$
httpsFlag
1
;
location
/ {
if
($
httpsFlag
=
0
) {
return
301
http
://$
host
$
request_uri
;
}
proxy_redirect
off
;
proxy_pass
http
://
yohobuy
-
pc
;
proxy_set_header
Host
$
host
;
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"
;
}
}
...
...
@@ -128,9 +204,13 @@ server
ssl_certificate
/
Data
/
local
/
nginx
-
1
.
8
.
0
/
conf
/
ssl
/
pc
/
server
.
pem
;
ssl_certificate_key
/
Data
/
local
/
nginx
-
1
.
8
.
0
/
conf
/
ssl
/
pc
/
server
.
key
;
root
/
Data
/
code
/
git
/
web
/
yohobuy
/
yohobuy
/
huodong
.
yohobuy
.
com
/
public
;
access_log
/
Data
/
logs
/
nginx
/
access_pc
.
yohobuy
.
com
.
log
fenxi
;
error_log
/
Data
/
logs
/
error_pc
.
yohobuy
.
com
.
log
warn
;
root
/
Data
/
code
/
git
/
web
/
yohobuy
/
yohobuy
/
huodong
.
yohobuy
.
com
/
public
;
# https key
include
vhosts
/
location
/
yohobuypc_httpskey
.
conf
;
location
^~ /
cuxiao
{
proxy_redirect
off
;
...
...
@@ -154,21 +234,55 @@ server
include
vhosts
/
location
/
yohobuypc_static
.
conf
;
}
#server
#{
# listen 80;
# listen 443 ssl;
#
# server_name yohobuy.com;
# ssl_certificate /Data/local/nginx-1.8.0/conf/ssl/pc/server.pem;
# ssl_certificate_key /Data/local/nginx-1.8.0/conf/ssl/pc/server.key;
#
# # access_log /Data/logs/nginx/access_pc.yohobuy.com.log fenxi;
# error_log /Data/logs/error_pc.yohobuy.com.log warn;
# location = / {
# return 301 https://www.yohobuy.com/;
# }
#}
server
{
listen
80
;
listen
443
ssl
;
server_name
yohobuy
.
com
;
ssl_certificate
/
Data
/
local
/
nginx
-
1
.
8
.
0
/
conf
/
ssl
/
pc
/
server
.
pem
;
ssl_certificate_key
/
Data
/
local
/
nginx
-
1
.
8
.
0
/
conf
/
ssl
/
pc
/
server
.
key
;
error_log
/
Data
/
logs
/
error_pc
.
yohobuy
.
com
.
log
warn
;
listen
443
;
server_name
analytics
.
m
.
yohobuy
.
com
;
ssl_certificate
/
Data
/
local
/
nginx
-
1
.
8
.
0
/
conf
/
ssl
/
m
.
yohobuy
.
pem
;
ssl_certificate_key
/
Data
/
local
/
nginx
-
1
.
8
.
0
/
conf
/
ssl
/
m
.
yohobuy
.
key
;
# https key
include
vhosts
/
location
/
yohobuywap_httpskey
.
conf
;
location
/ {
proxy_redirect
off
;
proxy_pass
http
://
yohobuy_analytics
;
proxy_set_header
Host
$
host
;
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"
;
}
}
# https key
include
vhosts
/
location
/
yohobuypc_httpskey
.
conf
;
server
{
listen
80
;
server_name
analytics
.
m
.
yohobuy
.
com
;
location
/ {
proxy_redirect
off
;
proxy_pass
http
://
yohobuy_analytics
;
proxy_set_header
Host
$
host
;
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"
;
}
location
= / {
return
301
https
://
www
.
yohobuy
.
com
/;
}
}
...
...
script/nginx/conf/vhost/testing/location/yohobuypc_node.conf
deleted
100644 → 0
View file @
68f3f0a
location
^~ /
passport
/
autosign
/
wechat
/ {
proxy_redirect
off
;
proxy_pass
http
://
yohobuy
-
node
;
proxy_set_header
Host
$
host
;
proxy_set_header
X
-
Forwarded
-
For
$
proxy_add_x_forwarded_for
;
proxy_set_header
Accept
-
Encoding
"gzip"
;
}
location
^~ /
passport
/
login
/
wechat
/ {
proxy_redirect
off
;
proxy_pass
http
://
yohobuy
-
node
;
proxy_set_header
Host
$
host
;
proxy_set_header
X
-
Forwarded
-
For
$
proxy_add_x_forwarded_for
;
proxy_set_header
Accept
-
Encoding
"gzip"
;
}
location
= /
product
/
index
/
getNodeContent
{
proxy_redirect
off
;
proxy_pass
http
://
yohobuy
-
node
;
proxy_set_header
Host
$
host
;
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"
;
}
location
^~ /
product
/
sale
/ {
proxy_redirect
off
;
proxy_pass
http
://
yohobuy
-
node
;
proxy_set_header
Host
$
host
;
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"
;
}
location
^~ /
product
/
outlets
/ {
proxy_redirect
off
;
proxy_pass
http
://
yohobuy
-
node
;
proxy_set_header
Host
$
host
;
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"
;
}
Please
register
or
login
to post a comment