shopmanage.yohobuy.com.conf
2.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
server {
listen 80;
server_name shopmanage.yohobuy.com;
#charset koi8-r;
access_log /Data/logs/nginx/access_shop_manage.yohobuy.com.log fenxi;
set $rewite 0;
if ($http_x_client_proto = 'http') {
set $rewite 1;
}
if ($http_x_forwarded_proto = 'http') {
set $rewite 1;
}
if ($rewite = 1) {
return 301 https://$host$request_uri ;
}
# nginx status check
location = /status_check {
default_type text/html;
return 200 'shopmanage.yohobuy.com - server is ok!';
}
location ^~ /platform/product/getRemoteImageUrlBySku {
proxy_redirect off;
proxy_pass http://yohobuy-platform/platform/product/getRemoteImageUrlBySku;
#proxy_set_header Host "shopmanage.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";
}
location /oldshops/ {
rewrite ^/oldshops/(.*)$ /$1 break;
proxy_redirect / /oldshops/;
proxy_pass http://yohobuy-shops;
proxy_set_header Host "shops.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";
}
location / {
proxy_redirect off;
#proxy_pass http://yohobuy-shop-manage-gray;
proxy_pass http://yohobuy-shop-manage;
proxy_set_header Host "shopmanage.yohobuy.com";
proxy_set_header X-Real-IP $http_x_forwarded_for;
proxy_set_header X-Forwarded-For $http_x_forwarded_for;
proxy_set_header Accept-Encoding "gzip";
#chunked_transfer_encoding off;
}
location /shops-proxy/ {
proxy_redirect off;
proxy_pass http://yohobuy-shops;
proxy_set_header Host "shops.yohobuy.com";
proxy_set_header X-Real-IP $http_x_forwarded_for;
proxy_set_header X-Forwarded-For $http_x_forwarded_for;
proxy_set_header Accept-Encoding "gzip";
}
location ~* /(static|assets)/ {
proxy_redirect off;
proxy_pass http://yohobuy-shops;
proxy_set_header Host "shops.yohobuy.com";
proxy_set_header X-Real-IP $http_x_forwarded_for;
proxy_set_header X-Forwarded-For $http_x_forwarded_for;
proxy_set_header Accept-Encoding "gzip";
}
}