Authored by hf

code review by fei.hong: do add pc nginx config

  1 +server
  2 +{
  3 + listen 80;
  4 + server_name www.yohobuy.com;
  5 + root /Data/PE/yohobuy-pc/yohobuy/www.yohobuy.com/public;
  6 +
  7 + # 频道相关
  8 + location = / {
  9 + proxy_redirect off;
  10 + proxy_pass http://yohobuy-pc;
  11 + proxy_set_header Host $host;
  12 + proxy_set_header X-Real-IP $remote_addr;
  13 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  14 + proxy_set_header Accept-Encoding "gzip";
  15 + }
  16 + location = /woman {
  17 + proxy_redirect off;
  18 + proxy_pass http://yohobuy-pc;
  19 + proxy_set_header Host $host;
  20 + proxy_set_header X-Real-IP $remote_addr;
  21 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  22 + proxy_set_header Accept-Encoding "gzip";
  23 + }
  24 + location = /kids {
  25 + proxy_redirect off;
  26 + proxy_pass http://yohobuy-pc;
  27 + proxy_set_header Host $host;
  28 + proxy_set_header X-Real-IP $remote_addr;
  29 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  30 + proxy_set_header Accept-Encoding "gzip";
  31 + }
  32 + location = /lifestyle {
  33 + proxy_redirect off;
  34 + proxy_pass http://yohobuy-pc;
  35 + proxy_set_header Host $host;
  36 + proxy_set_header X-Real-IP $remote_addr;
  37 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  38 + proxy_set_header Accept-Encoding "gzip";
  39 + }
  40 +
  41 + location ^~ /common {
  42 + proxy_redirect off;
  43 + proxy_pass http://yohobuy-pc;
  44 + proxy_set_header Host $host;
  45 + proxy_set_header X-Real-IP $remote_addr;
  46 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  47 + proxy_set_header Accept-Encoding "gzip";
  48 + }
  49 + location ^~ /tools {
  50 + proxy_redirect off;
  51 + proxy_pass http://yohobuy-pc;
  52 + proxy_set_header Host $host;
  53 + proxy_set_header X-Real-IP $remote_addr;
  54 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  55 + proxy_set_header Accept-Encoding "gzip";
  56 + }
  57 +
  58 + # 其它默认
  59 + location / {
  60 + proxy_redirect off;
  61 + proxy_pass http://yohobuy-old-www;
  62 + proxy_set_header Host $host;
  63 + proxy_set_header X-Real-IP $remote_addr;
  64 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  65 + proxy_set_header Accept-Encoding "gzip";
  66 + }
  67 +
  68 + location =/favicon.ico {
  69 + expires 30d;
  70 + }
  71 + location =/crossdomain.xml {
  72 + expires 30d;
  73 + }
  74 + location =/robots.txt {
  75 + expires 1d;
  76 + }
  77 +}
  78 +
  79 +server
  80 +{
  81 + listen 80;
  82 + server_name new.yohobuy.com;
  83 + root /Data/PE/yohobuy-pc/yohobuy/www.yohobuy.com/public;
  84 +
  85 + # 频道相关
  86 + location = / {
  87 + proxy_redirect off;
  88 + proxy_pass http://yohobuy-pc;
  89 + proxy_set_header Host $host;
  90 + proxy_set_header X-Real-IP $remote_addr;
  91 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  92 + proxy_set_header Accept-Encoding "gzip";
  93 + }
  94 + location = /woman {
  95 + proxy_redirect off;
  96 + proxy_pass http://yohobuy-pc;
  97 + proxy_set_header Host $host;
  98 + proxy_set_header X-Real-IP $remote_addr;
  99 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  100 + proxy_set_header Accept-Encoding "gzip";
  101 + }
  102 + location = /kids {
  103 + proxy_redirect off;
  104 + proxy_pass http://yohobuy-pc;
  105 + proxy_set_header Host $host;
  106 + proxy_set_header X-Real-IP $remote_addr;
  107 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  108 + proxy_set_header Accept-Encoding "gzip";
  109 + }
  110 + location = /lifestyle {
  111 + proxy_redirect off;
  112 + proxy_pass http://yohobuy-pc;
  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 + }
  118 +
  119 + location ^~ /common {
  120 + proxy_redirect off;
  121 + proxy_pass http://yohobuy-pc;
  122 + proxy_set_header Host $host;
  123 + proxy_set_header X-Real-IP $remote_addr;
  124 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  125 + proxy_set_header Accept-Encoding "gzip";
  126 + }
  127 +
  128 + # 其它默认
  129 + location / {
  130 + proxy_redirect off;
  131 + proxy_pass http://yohobuy-old-new;
  132 + proxy_set_header Host $host;
  133 + proxy_set_header X-Real-IP $remote_addr;
  134 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  135 + proxy_set_header Accept-Encoding "gzip";
  136 + }
  137 +
  138 + location =/favicon.ico {
  139 + expires 30d;
  140 + }
  141 + location =/crossdomain.xml {
  142 + expires 30d;
  143 + }
  144 + location =/robots.txt {
  145 + expires 1d;
  146 + }
  147 +}
  148 +