Showing
7 changed files
with
245 additions
and
124 deletions
1 | ssl on; | 1 | ssl on; |
2 | - ssl_dhparam /Data/local/nginx-1.8.0/conf/ssl/pc/server.pem; | 2 | + ssl_dhparam /Data/local/nginx-1.8.0/conf/ssl/dhparam.pem; |
3 | + # ssl_dhparam /Data/local/nginx-1.8.0/conf/ssl/pc/server.pem; | ||
3 | 4 | ||
4 | ssl_prefer_server_ciphers on; | 5 | ssl_prefer_server_ciphers on; |
5 | ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | 6 | ssl_protocols TLSv1 TLSv1.1 TLSv1.2; |
6 | 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"; | 7 | 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"; |
7 | ssl_session_tickets off; | 8 | ssl_session_tickets off; |
8 | - ssl_session_cache shared:SSL:10m; | ||
9 | + ssl_session_cache shared:SSL:10m; |
1 | 1 | ||
2 | - ## old idc | ||
3 | - location ^~ /passport/auth/signin { | 2 | + #old idc |
3 | + | ||
4 | + # location = /erp2goods { | ||
5 | + # proxy_redirect off; | ||
6 | + # proxy_pass http://yohobuy-old-www; | ||
7 | + # proxy_set_header Host $host; | ||
8 | + # proxy_set_header X-Real-IP $remote_addr; | ||
9 | + # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
10 | + # proxy_set_header Accept-Encoding "gzip"; | ||
11 | + # } | ||
12 | + | ||
13 | + location = /passport/auth/signin { | ||
4 | proxy_redirect off; | 14 | proxy_redirect off; |
5 | proxy_pass http://yohobuy-old-www; | 15 | proxy_pass http://yohobuy-old-www; |
6 | proxy_set_header Host $host; | 16 | proxy_set_header Host $host; |
@@ -9,7 +19,7 @@ | @@ -9,7 +19,7 @@ | ||
9 | proxy_set_header Accept-Encoding "gzip"; | 19 | proxy_set_header Accept-Encoding "gzip"; |
10 | } | 20 | } |
11 | 21 | ||
12 | - location ^~ /live/index { | 22 | + location = /live/index { |
13 | proxy_redirect off; | 23 | proxy_redirect off; |
14 | proxy_pass http://yohobuy-old-www; | 24 | proxy_pass http://yohobuy-old-www; |
15 | proxy_set_header Host $host; | 25 | proxy_set_header Host $host; |
@@ -19,7 +29,13 @@ | @@ -19,7 +29,13 @@ | ||
19 | } | 29 | } |
20 | 30 | ||
21 | location = /yohoshow { | 31 | location = /yohoshow { |
22 | - return 301 http://$host; | 32 | + # proxy_redirect off; |
33 | + # proxy_pass http://yohobuy-old-www; | ||
34 | + # proxy_set_header Host $host; | ||
35 | + # proxy_set_header X-Real-IP $remote_addr; | ||
36 | + # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
37 | + # proxy_set_header Accept-Encoding "gzip"; | ||
38 | + return 301 http://$host; | ||
23 | } | 39 | } |
24 | 40 | ||
25 | location =/product/specials { | 41 | location =/product/specials { |
@@ -51,17 +67,17 @@ | @@ -51,17 +67,17 @@ | ||
51 | rewrite ^/logout_(.+).html http://www.yohobuy.com/logout.html?token=$1; | 67 | rewrite ^/logout_(.+).html http://www.yohobuy.com/logout.html?token=$1; |
52 | } | 68 | } |
53 | 69 | ||
54 | - location ^~ /product/pro_ { | 70 | + location ^~ /product/pro_ { |
55 | return 301 http://item.yohobuy.com$request_uri; | 71 | return 301 http://item.yohobuy.com$request_uri; |
56 | } | 72 | } |
57 | 73 | ||
58 | - location = /sale { | ||
59 | - rewrite /sale http://www.yohobuy.com/product/sale/ permanent; | 74 | + location = /sale { |
75 | + rewrite /sale http://www.yohobuy.com/product/sale/ permanent; | ||
60 | } | 76 | } |
61 | 77 | ||
62 | - location ^~ /brands/ { | ||
63 | - rewrite /brands/$ http://www.yohobuy.com/brands permanent; | ||
64 | - } | 78 | + #location ^~ /brands/ { |
79 | + # rewrite /brands/$ http://www.yohobuy.com/brands permanent; | ||
80 | + #} | ||
65 | location ^~ /discount { | 81 | location ^~ /discount { |
66 | rewrite /discount http://search.yohobuy.com permanent; | 82 | rewrite /discount http://search.yohobuy.com permanent; |
67 | } | 83 | } |
@@ -88,4 +104,14 @@ | @@ -88,4 +104,14 @@ | ||
88 | 104 | ||
89 | location ^~ /product/exhibit { | 105 | location ^~ /product/exhibit { |
90 | rewrite /product/exhibit http://www.yohobuy.com permanent; | 106 | rewrite /product/exhibit http://www.yohobuy.com permanent; |
91 | - } | ||
107 | + } | ||
108 | + | ||
109 | + | ||
110 | + location ^~ /Passport/session/index { | ||
111 | + proxy_redirect off; | ||
112 | + proxy_pass http://yohobuy-old-www; | ||
113 | + proxy_set_header Host $host; | ||
114 | + proxy_set_header X-Real-IP $remote_addr; | ||
115 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
116 | + proxy_set_header Accept-Encoding "gzip"; | ||
117 | + } |
1 | -location ^~ /passport/autosign/wechat/ { | ||
2 | - proxy_redirect off; | ||
3 | - proxy_pass http://yohobuy-node; | ||
4 | - proxy_set_header Host $host; | ||
5 | - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
6 | - proxy_set_header Accept-Encoding "gzip"; | ||
7 | - } | ||
8 | 1 | ||
9 | - location ^~ /passport/login/wechat/ { | ||
10 | - proxy_redirect off; | ||
11 | - proxy_pass http://yohobuy-node; | ||
12 | - proxy_set_header Host $host; | ||
13 | - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
14 | - proxy_set_header Accept-Encoding "gzip"; | ||
15 | - } | 2 | +location ^~ /product/sale/ { |
3 | + proxy_redirect off; | ||
4 | + proxy_pass http://yohobuy-node; | ||
5 | + proxy_set_header Host $host; | ||
6 | + proxy_set_header X-Real-IP $remote_addr; | ||
7 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
8 | + proxy_set_header Accept-Encoding "gzip"; | ||
9 | +} | ||
16 | 10 | ||
17 | - location = /product/index/getNodeContent { | ||
18 | - proxy_redirect off; | ||
19 | - proxy_pass http://yohobuy-node; | ||
20 | - proxy_set_header Host $host; | ||
21 | - proxy_set_header X-Real-IP $remote_addr; | ||
22 | - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
23 | - proxy_set_header Accept-Encoding "gzip"; | ||
24 | - } | 11 | +location ^~ /product/outlets/ { |
12 | + proxy_redirect off; | ||
13 | + proxy_pass http://yohobuy-node; | ||
14 | + proxy_set_header Host $host; | ||
15 | + proxy_set_header X-Real-IP $remote_addr; | ||
16 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
17 | + proxy_set_header Accept-Encoding "gzip"; | ||
18 | +} | ||
25 | 19 | ||
26 | - location ^~ /product/sale/ { | ||
27 | - proxy_redirect off; | ||
28 | - proxy_pass http://yohobuy-node; | ||
29 | - proxy_set_header Host $host; | ||
30 | - proxy_set_header X-Real-IP $remote_addr; | ||
31 | - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
32 | - proxy_set_header Accept-Encoding "gzip"; | ||
33 | - } | 20 | +location = /passport/autosign/wechat { |
21 | + proxy_redirect off; | ||
22 | + proxy_pass http://yohobuy-node; | ||
23 | + proxy_set_header Host $host; | ||
24 | + proxy_set_header X-Real-IP $remote_addr; | ||
25 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
26 | + proxy_set_header Accept-Encoding "gzip"; | ||
27 | +} | ||
34 | 28 | ||
35 | - location ^~ /product/outlets/ { | ||
36 | - proxy_redirect off; | ||
37 | - proxy_pass http://yohobuy-node; | ||
38 | - proxy_set_header Host $host; | ||
39 | - proxy_set_header X-Real-IP $remote_addr; | ||
40 | - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
41 | - proxy_set_header Accept-Encoding "gzip"; | ||
42 | - } | 29 | +location ^~ /passport/login/wechat/ { |
30 | + proxy_redirect off; | ||
31 | + proxy_pass http://yohobuy-node; | ||
32 | + proxy_set_header Host $host; | ||
33 | + proxy_set_header X-Real-IP $remote_addr; | ||
34 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
35 | + proxy_set_header Accept-Encoding "gzip"; | ||
36 | +} | ||
37 | + | ||
38 | +# location ^~ /sale/ { | ||
39 | +# proxy_redirect off; | ||
40 | +# proxy_pass http://yohobuy-node; | ||
41 | +# proxy_set_header Host $host; | ||
42 | +# proxy_set_header X-Real-IP $remote_addr; | ||
43 | +# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
44 | +# proxy_set_header Accept-Encoding "gzip"; | ||
45 | +# } | ||
46 | + | ||
47 | + | ||
48 | +#location = /product/index/getNodeContent { | ||
49 | +# proxy_redirect off; | ||
50 | +# proxy_pass http://yohobuy-node; | ||
51 | +# proxy_set_header Host $host; | ||
52 | +# proxy_set_header X-Real-IP $remote_addr; | ||
53 | +# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
54 | +# proxy_set_header Accept-Encoding "gzip"; | ||
55 | +# } |
1 | - #SEO optimization | 1 | +#SEO optimization |
2 | if ($host ~* ^www\.(.*)\.yohobuy\.com) { | 2 | if ($host ~* ^www\.(.*)\.yohobuy\.com) { |
3 | set $sub_name $1; | 3 | set $sub_name $1; |
4 | return 301 $scheme://$sub_name.yohobuy.com$request_uri; | 4 | return 301 $scheme://$sub_name.yohobuy.com$request_uri; |
@@ -20,4 +20,14 @@ | @@ -20,4 +20,14 @@ | ||
20 | proxy_set_header Host service.yoho.cn; | 20 | proxy_set_header Host service.yoho.cn; |
21 | proxy_set_header X-Real-IP $remote_addr; | 21 | proxy_set_header X-Real-IP $remote_addr; |
22 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | 22 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
23 | + } | ||
24 | + | ||
25 | + | ||
26 | + location ^~ /brands { | ||
27 | + proxy_redirect off; | ||
28 | + proxy_pass http://yohobuy-pc; | ||
29 | + proxy_set_header Host $host; | ||
30 | + proxy_set_header X-Real-IP $remote_addr; | ||
31 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
32 | + proxy_set_header Accept-Encoding "gzip"; | ||
23 | } | 33 | } |
@@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
8 | expires 1d; | 8 | expires 1d; |
9 | } | 9 | } |
10 | 10 | ||
11 | - ##百度站长的校验文件, 百度站长账号feng322169 密码yoho9646 | 11 | + ##百度站长的校验文件, 百度站长账号feng322169 密码yoho9646 |
12 | location = /baidu_verify_Mrj1Pt3L86.html { | 12 | location = /baidu_verify_Mrj1Pt3L86.html { |
13 | root /Data/PE/yohobuy_pc/assets; | 13 | root /Data/PE/yohobuy_pc/assets; |
14 | expires 7d; | 14 | expires 7d; |
1 | server | 1 | server |
2 | { | 2 | { |
3 | listen 80; | 3 | listen 80; |
4 | - server_name *.yohobuy.com; | 4 | + server_name www.yohobuy.com *.yohobuy.com; |
5 | root /Data/code/git/web/yohobuy/yohobuy/www.yohobuy.com/public; | 5 | root /Data/code/git/web/yohobuy/yohobuy/www.yohobuy.com/public; |
6 | 6 | ||
7 | access_log /Data/logs/nginx/access_pc.yohobuy.com.log fenxi; | 7 | access_log /Data/logs/nginx/access_pc.yohobuy.com.log fenxi; |
8 | - error_log /Data/logs/error.pc.yohobuy.com.log warn; | 8 | + error_log /Data/logs/error_pc.yohobuy.com.log warn; |
9 | 9 | ||
10 | # static file | 10 | # static file |
11 | include vhosts/location/yohobuypc_static.conf; | 11 | include vhosts/location/yohobuypc_static.conf; |
@@ -16,6 +16,10 @@ server | @@ -16,6 +16,10 @@ server | ||
16 | # php | 16 | # php |
17 | include vhosts/location/yohobuypc_php.conf; | 17 | include vhosts/location/yohobuypc_php.conf; |
18 | 18 | ||
19 | + # node | ||
20 | + include vhosts/location/yohobuypc_node.conf; | ||
21 | + | ||
22 | + | ||
19 | location = /index.html { | 23 | location = /index.html { |
20 | return 301 http://www.yohobuy.com/; | 24 | return 301 http://www.yohobuy.com/; |
21 | } | 25 | } |
@@ -24,16 +28,68 @@ server | @@ -24,16 +28,68 @@ server | ||
24 | rewrite /resource/getbanner(.*)$ https://www.yohobuy.com/common/getbanner$1 permanent; | 28 | rewrite /resource/getbanner(.*)$ https://www.yohobuy.com/common/getbanner$1 permanent; |
25 | } | 29 | } |
26 | 30 | ||
27 | - # others http 301 redirect https | 31 | + location ~* /special_(\d+)_(.*)\.html$ { |
32 | + proxy_redirect off; | ||
33 | + proxy_pass http://yohobuy-old-www; | ||
34 | + proxy_set_header Host $host; | ||
35 | + proxy_set_header X-Real-IP $remote_addr; | ||
36 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
37 | + proxy_set_header Accept-Encoding "gzip"; | ||
38 | + } | ||
39 | + | ||
40 | + location ~* /special/(\d+)_(.*)\.html$ { | ||
41 | + proxy_redirect off; | ||
42 | + proxy_pass http://yohobuy-node; | ||
43 | + proxy_set_header Host $host; | ||
44 | + proxy_set_header X-Real-IP $remote_addr; | ||
45 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
46 | + proxy_set_header Accept-Encoding "gzip"; | ||
47 | + } | ||
48 | + | ||
49 | + #https flag, 1 means HTTPS, 0 means HTTP | ||
50 | + set $httpsFlag 1; | ||
51 | + | ||
52 | + location / { | ||
53 | + if ($httpsFlag = 1) { | ||
54 | + return 301 https://$host$request_uri; | ||
55 | + } | ||
56 | + | ||
57 | + proxy_redirect off; | ||
58 | + proxy_pass http://yohobuy-pc; | ||
59 | + proxy_set_header Host $host; | ||
60 | + proxy_set_header X-Real-IP $remote_addr; | ||
61 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
62 | + proxy_set_header Accept-Encoding "gzip"; | ||
63 | + } | ||
64 | + | ||
65 | +} | ||
66 | + | ||
67 | +server | ||
68 | +{ | ||
69 | + listen 80; | ||
70 | + listen 443 ssl; | ||
71 | + ssl_certificate /Data/local/nginx-1.8.0/conf/ssl/pc/server.pem; | ||
72 | + ssl_certificate_key /Data/local/nginx-1.8.0/conf/ssl/pc/server.key; | ||
73 | + | ||
74 | + server_name list.yohobuy.com item.yohobuy.com sale.yohobuy.com new.yohobuy.com search.yohobuy.com guang.yohobuy.com shop.yohobuy.com; | ||
75 | + | ||
76 | + # https key | ||
77 | + include vhosts/location/yohobuypc_httpskey.conf; | ||
78 | + | ||
28 | location / { | 79 | location / { |
29 | - return 301 https://$host$request_uri; | 80 | + proxy_redirect off; |
81 | + proxy_pass http://yohobuy-pc; | ||
82 | + proxy_set_header Host $host; | ||
83 | + proxy_set_header X-Real-IP $remote_addr; | ||
84 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
85 | + proxy_set_header Accept-Encoding "gzip"; | ||
30 | } | 86 | } |
31 | } | 87 | } |
32 | 88 | ||
33 | server | 89 | server |
34 | { | 90 | { |
35 | listen 443; | 91 | listen 443; |
36 | - server_name *.yohobuy.com; | 92 | + server_name www.yohobuy.com *.yohobuy.com; |
37 | 93 | ||
38 | ssl_certificate /Data/local/nginx-1.8.0/conf/ssl/pc/server.pem; | 94 | ssl_certificate /Data/local/nginx-1.8.0/conf/ssl/pc/server.pem; |
39 | ssl_certificate_key /Data/local/nginx-1.8.0/conf/ssl/pc/server.key; | 95 | ssl_certificate_key /Data/local/nginx-1.8.0/conf/ssl/pc/server.key; |
@@ -41,7 +97,10 @@ server | @@ -41,7 +97,10 @@ server | ||
41 | root /Data/code/git/web/yohobuy/yohobuy/www.yohobuy.com/public; | 97 | root /Data/code/git/web/yohobuy/yohobuy/www.yohobuy.com/public; |
42 | 98 | ||
43 | access_log /Data/logs/nginx/access_pc.yohobuy.com.log fenxi; | 99 | access_log /Data/logs/nginx/access_pc.yohobuy.com.log fenxi; |
44 | - error_log /Data/logs/error.pc.yohobuy.com.log warn; | 100 | + error_log /Data/logs/error_pc.yohobuy.com.log warn; |
101 | + | ||
102 | + # https key | ||
103 | + include vhosts/location/yohobuypc_httpskey.conf; | ||
45 | 104 | ||
46 | # static file | 105 | # static file |
47 | include vhosts/location/yohobuypc_static.conf; | 106 | include vhosts/location/yohobuypc_static.conf; |
@@ -52,21 +111,38 @@ server | @@ -52,21 +111,38 @@ server | ||
52 | # php | 111 | # php |
53 | include vhosts/location/yohobuypc_php.conf; | 112 | include vhosts/location/yohobuypc_php.conf; |
54 | 113 | ||
114 | + # node | ||
115 | + include vhosts/location/yohobuypc_node.conf; | ||
116 | + | ||
117 | + location ~* /special_(\d+)_(.*)\.html$ { | ||
118 | + return 301 http://$host$request_uri; | ||
119 | + } | ||
120 | + | ||
121 | + location ~* /special/(\d+)_(.*)\.html$ { | ||
122 | + return 301 http://$host$request_uri; | ||
123 | + } | ||
124 | + | ||
55 | location = /index.html { | 125 | location = /index.html { |
56 | - return 301 https://www.yohobuy.com/; | 126 | + return 301 http://www.yohobuy.com/; |
57 | } | 127 | } |
58 | 128 | ||
59 | location ^~ /resource/getbanner { | 129 | location ^~ /resource/getbanner { |
60 | rewrite /resource/getbanner(.*)$ https://www.yohobuy.com/common/getbanner$1 permanent; | 130 | rewrite /resource/getbanner(.*)$ https://www.yohobuy.com/common/getbanner$1 permanent; |
61 | } | 131 | } |
62 | 132 | ||
63 | - location / { | ||
64 | - proxy_redirect off; | ||
65 | - proxy_pass http://yohobuy-pc; | ||
66 | - proxy_set_header Host $host; | ||
67 | - proxy_set_header X-Real-IP $remote_addr; | ||
68 | - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
69 | - proxy_set_header Accept-Encoding "gzip"; | 133 | + #https flag, 1 means HTTPS, 0 means HTTP |
134 | + set $httpsFlag 1; | ||
135 | + | ||
136 | + location / { | ||
137 | + if ($httpsFlag = 0) { | ||
138 | + return 301 http://$host$request_uri; | ||
139 | + } | ||
140 | + proxy_redirect off; | ||
141 | + proxy_pass http://yohobuy-pc; | ||
142 | + proxy_set_header Host $host; | ||
143 | + proxy_set_header X-Real-IP $remote_addr; | ||
144 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
145 | + proxy_set_header Accept-Encoding "gzip"; | ||
70 | } | 146 | } |
71 | } | 147 | } |
72 | 148 | ||
@@ -128,9 +204,13 @@ server | @@ -128,9 +204,13 @@ server | ||
128 | ssl_certificate /Data/local/nginx-1.8.0/conf/ssl/pc/server.pem; | 204 | ssl_certificate /Data/local/nginx-1.8.0/conf/ssl/pc/server.pem; |
129 | ssl_certificate_key /Data/local/nginx-1.8.0/conf/ssl/pc/server.key; | 205 | ssl_certificate_key /Data/local/nginx-1.8.0/conf/ssl/pc/server.key; |
130 | 206 | ||
207 | + root /Data/code/git/web/yohobuy/yohobuy/huodong.yohobuy.com/public; | ||
208 | + | ||
131 | access_log /Data/logs/nginx/access_pc.yohobuy.com.log fenxi; | 209 | access_log /Data/logs/nginx/access_pc.yohobuy.com.log fenxi; |
132 | error_log /Data/logs/error_pc.yohobuy.com.log warn; | 210 | error_log /Data/logs/error_pc.yohobuy.com.log warn; |
133 | - root /Data/code/git/web/yohobuy/yohobuy/huodong.yohobuy.com/public; | 211 | + |
212 | + # https key | ||
213 | + include vhosts/location/yohobuypc_httpskey.conf; | ||
134 | 214 | ||
135 | location ^~ /cuxiao { | 215 | location ^~ /cuxiao { |
136 | proxy_redirect off; | 216 | proxy_redirect off; |
@@ -154,21 +234,55 @@ server | @@ -154,21 +234,55 @@ server | ||
154 | include vhosts/location/yohobuypc_static.conf; | 234 | include vhosts/location/yohobuypc_static.conf; |
155 | } | 235 | } |
156 | 236 | ||
237 | +#server | ||
238 | +#{ | ||
239 | +# listen 80; | ||
240 | +# listen 443 ssl; | ||
241 | +# | ||
242 | +# server_name yohobuy.com; | ||
243 | +# ssl_certificate /Data/local/nginx-1.8.0/conf/ssl/pc/server.pem; | ||
244 | +# ssl_certificate_key /Data/local/nginx-1.8.0/conf/ssl/pc/server.key; | ||
245 | +# | ||
246 | +# # access_log /Data/logs/nginx/access_pc.yohobuy.com.log fenxi; | ||
247 | +# error_log /Data/logs/error_pc.yohobuy.com.log warn; | ||
248 | +# location = / { | ||
249 | +# return 301 https://www.yohobuy.com/; | ||
250 | +# } | ||
251 | +#} | ||
252 | + | ||
157 | server | 253 | server |
158 | { | 254 | { |
159 | - listen 80; | ||
160 | - listen 443 ssl; | ||
161 | - | ||
162 | - server_name yohobuy.com; | ||
163 | - ssl_certificate /Data/local/nginx-1.8.0/conf/ssl/pc/server.pem; | ||
164 | - ssl_certificate_key /Data/local/nginx-1.8.0/conf/ssl/pc/server.key; | ||
165 | - | ||
166 | - error_log /Data/logs/error_pc.yohobuy.com.log warn; | 255 | + listen 443; |
256 | + server_name analytics.m.yohobuy.com; | ||
257 | + | ||
258 | + ssl_certificate /Data/local/nginx-1.8.0/conf/ssl/m.yohobuy.pem; | ||
259 | + ssl_certificate_key /Data/local/nginx-1.8.0/conf/ssl/m.yohobuy.key; | ||
260 | + | ||
261 | + # https key | ||
262 | + include vhosts/location/yohobuywap_httpskey.conf; | ||
263 | + | ||
264 | + location / { | ||
265 | + proxy_redirect off; | ||
266 | + proxy_pass http://yohobuy_analytics; | ||
267 | + proxy_set_header Host $host; | ||
268 | + proxy_set_header X-Real-IP $remote_addr; | ||
269 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
270 | + proxy_set_header Accept-Encoding "gzip"; | ||
271 | + } | ||
272 | +} | ||
167 | 273 | ||
168 | - # https key | ||
169 | - include vhosts/location/yohobuypc_httpskey.conf; | 274 | + server |
275 | +{ | ||
276 | + listen 80; | ||
277 | + server_name analytics.m.yohobuy.com; | ||
278 | + | ||
279 | + location / { | ||
280 | + proxy_redirect off; | ||
281 | + proxy_pass http://yohobuy_analytics; | ||
282 | + proxy_set_header Host $host; | ||
283 | + proxy_set_header X-Real-IP $remote_addr; | ||
284 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
285 | + proxy_set_header Accept-Encoding "gzip"; | ||
286 | + } | ||
170 | 287 | ||
171 | - location = / { | ||
172 | - return 301 https://www.yohobuy.com/; | ||
173 | - } | ||
174 | } | 288 | } |
1 | -location ^~ /passport/autosign/wechat/ { | ||
2 | - proxy_redirect off; | ||
3 | - proxy_pass http://yohobuy-node; | ||
4 | - proxy_set_header Host $host; | ||
5 | - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
6 | - proxy_set_header Accept-Encoding "gzip"; | ||
7 | - } | ||
8 | - | ||
9 | - location ^~ /passport/login/wechat/ { | ||
10 | - proxy_redirect off; | ||
11 | - proxy_pass http://yohobuy-node; | ||
12 | - proxy_set_header Host $host; | ||
13 | - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
14 | - proxy_set_header Accept-Encoding "gzip"; | ||
15 | - } | ||
16 | - | ||
17 | - location = /product/index/getNodeContent { | ||
18 | - proxy_redirect off; | ||
19 | - proxy_pass http://yohobuy-node; | ||
20 | - proxy_set_header Host $host; | ||
21 | - proxy_set_header X-Real-IP $remote_addr; | ||
22 | - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
23 | - proxy_set_header Accept-Encoding "gzip"; | ||
24 | - } | ||
25 | - | ||
26 | - location ^~ /product/sale/ { | ||
27 | - proxy_redirect off; | ||
28 | - proxy_pass http://yohobuy-node; | ||
29 | - proxy_set_header Host $host; | ||
30 | - proxy_set_header X-Real-IP $remote_addr; | ||
31 | - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
32 | - proxy_set_header Accept-Encoding "gzip"; | ||
33 | - } | ||
34 | - | ||
35 | - location ^~ /product/outlets/ { | ||
36 | - proxy_redirect off; | ||
37 | - proxy_pass http://yohobuy-node; | ||
38 | - proxy_set_header Host $host; | ||
39 | - proxy_set_header X-Real-IP $remote_addr; | ||
40 | - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
41 | - proxy_set_header Accept-Encoding "gzip"; | ||
42 | - } | ||
43 | - |
-
Please register or login to post a comment