Authored by hf

do add nginx config

  1 +server
  2 +{
  3 + listen 80;
  4 + server_name m.yohobuy.com *.m.yohobuy.com nginx1.m.yohobuy.com;
  5 +
  6 + access_log /Data/logs/nginx/access_wap.yohobuy.com.log fenxi;
  7 + error_log /Data/logs/error.mtesth5.yohobuy.com.log warn;
  8 +
  9 + root /Data/PE/yohobuy/yohobuy/m.yohobuy.com/public;
  10 +
  11 + # APP相关
  12 + location = /appembed {
  13 + default_type application/json;
  14 + return 200 '{"code":200,"message":"app embed","data":{"open":"N","url":"http://m.yohobuy.com"}}';
  15 + }
  16 + location = /help/shareorder.html {
  17 + root /Data/code/git/yohobuy/yohobuy/assets;
  18 + expires 7d;
  19 + }
  20 +
  21 + # 错误页面
  22 + location = /error.html {
  23 + root /Data/PE/yohobuy/assets;
  24 + expires 7d;
  25 + }
  26 +
  27 + # 账户相关
  28 + location = /reg.html {
  29 + proxy_redirect off;
  30 + proxy_pass http://yohobuy;
  31 + proxy_set_header Host $host;
  32 + proxy_set_header X-Real-IP $remote_addr;
  33 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  34 + proxy_set_header Accept-Encoding "gzip";
  35 + }
  36 + location = /signin.html {
  37 + proxy_redirect off;
  38 + proxy_pass http://yohobuy;
  39 + proxy_set_header Host $host;
  40 + proxy_set_header X-Real-IP $remote_addr;
  41 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  42 + proxy_set_header Accept-Encoding "gzip";
  43 + }
  44 + location = /login.html {
  45 + proxy_redirect off;
  46 + proxy_pass http://yohobuy;
  47 + proxy_set_header Host $host;
  48 + proxy_set_header X-Real-IP $remote_addr;
  49 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  50 + proxy_set_header Accept-Encoding "gzip";
  51 + }
  52 + location = /emailback.html {
  53 + proxy_redirect off;
  54 + proxy_pass http://yohobuy;
  55 + proxy_set_header Host $host;
  56 + proxy_set_header X-Real-IP $remote_addr;
  57 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  58 + proxy_set_header Accept-Encoding "gzip";
  59 + }
  60 + location = /phoneback.html {
  61 + proxy_redirect off;
  62 + proxy_pass http://yohobuy;
  63 + proxy_set_header Host $host;
  64 + proxy_set_header X-Real-IP $remote_addr;
  65 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  66 + proxy_set_header Accept-Encoding "gzip";
  67 + }
  68 + location ^~ /passport/reg {
  69 + proxy_redirect off;
  70 + proxy_pass http://yohobuy;
  71 + proxy_set_header Host $host;
  72 + proxy_set_header X-Real-IP $remote_addr;
  73 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  74 + proxy_set_header Accept-Encoding "gzip";
  75 + }
  76 + location ^~ /passport/login {
  77 + proxy_redirect off;
  78 + proxy_pass http://yohobuy;
  79 + proxy_set_header Host $host;
  80 + proxy_set_header X-Real-IP $remote_addr;
  81 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  82 + proxy_set_header Accept-Encoding "gzip";
  83 + }
  84 + location ^~ /passport/back {
  85 + proxy_redirect off;
  86 + proxy_pass http://yohobuy;
  87 + proxy_set_header Host $host;
  88 + proxy_set_header X-Real-IP $remote_addr;
  89 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  90 + proxy_set_header Accept-Encoding "gzip";
  91 + }
  92 +
  93 + # 频道相关
  94 + location = / {
  95 + proxy_redirect off;
  96 + proxy_pass http://yohobuy;
  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 = /boys {
  103 + proxy_redirect off;
  104 + proxy_pass http://yohobuy;
  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 = /girls {
  111 + proxy_redirect off;
  112 + proxy_pass http://yohobuy;
  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 + location = /kids {
  119 + proxy_redirect off;
  120 + proxy_pass http://yohobuy;
  121 + proxy_set_header Host $host;
  122 + proxy_set_header X-Real-IP $remote_addr;
  123 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  124 + proxy_set_header Accept-Encoding "gzip";
  125 + }
  126 + location = /lifestyle {
  127 + proxy_redirect off;
  128 + proxy_pass http://yohobuy;
  129 + proxy_set_header Host $host;
  130 + proxy_set_header X-Real-IP $remote_addr;
  131 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  132 + proxy_set_header Accept-Encoding "gzip";
  133 + }
  134 + location = /girl {
  135 + proxy_redirect off;
  136 + proxy_pass http://yohobuy;
  137 + proxy_set_header Host $host;
  138 + proxy_set_header X-Real-IP $remote_addr;
  139 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  140 + proxy_set_header Accept-Encoding "gzip";
  141 + }
  142 + location = /boys/bottomBanner {
  143 + proxy_redirect off;
  144 + proxy_pass http://yohobuy;
  145 + proxy_set_header Host $host;
  146 + proxy_set_header X-Real-IP $remote_addr;
  147 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  148 + proxy_set_header Accept-Encoding "gzip";
  149 + }
  150 + location = /girls/bottomBanner {
  151 + proxy_redirect off;
  152 + proxy_pass http://yohobuy;
  153 + proxy_set_header Host $host;
  154 + proxy_set_header X-Real-IP $remote_addr;
  155 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  156 + proxy_set_header Accept-Encoding "gzip";
  157 + }
  158 +
  159 + location = /cate {
  160 + proxy_redirect off;
  161 + proxy_pass http://yohobuy;
  162 + proxy_set_header Host $host;
  163 + proxy_set_header X-Real-IP $remote_addr;
  164 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  165 + proxy_set_header Accept-Encoding "gzip";
  166 + }
  167 + location = /brands {
  168 + proxy_redirect off;
  169 + proxy_pass http://yohobuy;
  170 + proxy_set_header Host $host;
  171 + proxy_set_header X-Real-IP $remote_addr;
  172 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  173 + proxy_set_header Accept-Encoding "gzip";
  174 + }
  175 + location = /sale {
  176 + proxy_redirect off;
  177 + proxy_pass http://yohobuy;
  178 + proxy_set_header Host $host;
  179 + proxy_set_header X-Real-IP $remote_addr;
  180 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  181 + proxy_set_header Accept-Encoding "gzip";
  182 + }
  183 + location = /brands/search {
  184 + proxy_redirect off;
  185 + proxy_pass http://yohobuy;
  186 + proxy_set_header Host $host;
  187 + proxy_set_header X-Real-IP $remote_addr;
  188 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  189 + proxy_set_header Accept-Encoding "gzip";
  190 + }
  191 + location = /product/new {
  192 + proxy_redirect off;
  193 + proxy_pass http://yohobuy;
  194 + proxy_set_header Host $host;
  195 + proxy_set_header X-Real-IP $remote_addr;
  196 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  197 + proxy_set_header Accept-Encoding "gzip";
  198 + }
  199 + location ^~ /product/newsale/ {
  200 + proxy_redirect off;
  201 + proxy_pass http://yohobuy;
  202 + proxy_set_header Host $host;
  203 + proxy_set_header X-Real-IP $remote_addr;
  204 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  205 + proxy_set_header Accept-Encoding "gzip";
  206 + }
  207 + location ^~ /product/opt/ {
  208 + proxy_redirect off;
  209 + proxy_pass http://yohobuy;
  210 + proxy_set_header Host $host;
  211 + proxy_set_header X-Real-IP $remote_addr;
  212 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  213 + proxy_set_header Accept-Encoding "gzip";
  214 + }
  215 + location ^~ /product/recom/ {
  216 + proxy_redirect off;
  217 + proxy_pass http://yohobuy;
  218 + proxy_set_header Host $host;
  219 + proxy_set_header X-Real-IP $remote_addr;
  220 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  221 + proxy_set_header Accept-Encoding "gzip";
  222 + }
  223 + location ^~ /product/pro_ {
  224 + proxy_redirect off;
  225 + proxy_pass http://yohobuy;
  226 + proxy_set_header Host $host;
  227 + proxy_set_header X-Real-IP $remote_addr;
  228 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  229 + proxy_set_header Accept-Encoding "gzip";
  230 + }
  231 + location ^~ /product/intro_ {
  232 + proxy_redirect off;
  233 + proxy_pass http://yohobuy;
  234 + proxy_set_header Host $host;
  235 + proxy_set_header X-Real-IP $remote_addr;
  236 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  237 + proxy_set_header Accept-Encoding "gzip";
  238 + }
  239 + location ^~ /product/detail/ {
  240 + proxy_redirect off;
  241 + proxy_pass http://yohobuy;
  242 + proxy_set_header Host $host;
  243 + proxy_set_header X-Real-IP $remote_addr;
  244 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  245 + proxy_set_header Accept-Encoding "gzip";
  246 + }
  247 + location = /hotrank {
  248 + proxy_redirect off;
  249 + proxy_pass http://yohobuy;
  250 + proxy_set_header Host $host;
  251 + proxy_set_header X-Real-IP $remote_addr;
  252 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  253 + proxy_set_header Accept-Encoding "gzip";
  254 + }
  255 +
  256 + # 逛相关
  257 + location ^~ /guang/ {
  258 + proxy_redirect off;
  259 + proxy_pass http://yohobuy;
  260 + proxy_set_header Host $host;
  261 + proxy_set_header X-Real-IP $remote_addr;
  262 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  263 + proxy_set_header Accept-Encoding "gzip";
  264 + }
  265 + location ^~ /tags/index {
  266 + proxy_redirect off;
  267 + proxy_pass http://yohobuy;
  268 + proxy_set_header Host $host;
  269 + proxy_set_header X-Real-IP $remote_addr;
  270 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  271 + proxy_set_header Accept-Encoding "gzip";
  272 + }
  273 + location ^~ /author/index {
  274 + proxy_redirect off;
  275 + proxy_pass http://yohobuy;
  276 + proxy_set_header Host $host;
  277 + proxy_set_header X-Real-IP $remote_addr;
  278 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  279 + proxy_set_header Accept-Encoding "gzip";
  280 + }
  281 + location ^~ /info/index {
  282 + proxy_redirect off;
  283 + proxy_pass http://yohobuy;
  284 + proxy_set_header Host $host;
  285 + proxy_set_header X-Real-IP $remote_addr;
  286 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  287 + proxy_set_header Accept-Encoding "gzip";
  288 + }
  289 + location ^~ /info/mini {
  290 + proxy_redirect off;
  291 + proxy_pass http://yohobuy;
  292 + proxy_set_header Host $host;
  293 + proxy_set_header X-Real-IP $remote_addr;
  294 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  295 + proxy_set_header Accept-Encoding "gzip";
  296 + }
  297 + location ^~ /plustar {
  298 + proxy_redirect off;
  299 + proxy_pass http://yohobuy;
  300 + proxy_set_header Host $host;
  301 + proxy_set_header X-Real-IP $remote_addr;
  302 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  303 + proxy_set_header Accept-Encoding "gzip";
  304 + }
  305 + location ^~ /rss {
  306 + proxy_redirect off;
  307 + proxy_pass http://yohobuy;
  308 + proxy_set_header Host $host;
  309 + proxy_set_header X-Real-IP $remote_addr;
  310 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  311 + proxy_set_header Accept-Encoding "gzip";
  312 + }
  313 +
  314 + # 搜索相关
  315 + location ^~ /search {
  316 + proxy_redirect off;
  317 + proxy_pass http://yohobuy;
  318 + proxy_set_header Host $host;
  319 + proxy_set_header X-Real-IP $remote_addr;
  320 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  321 + proxy_set_header Accept-Encoding "gzip";
  322 + }
  323 + location ^~ /index/search {
  324 + proxy_redirect off;
  325 + proxy_pass http://yohobuy;
  326 + proxy_set_header Host $host;
  327 + proxy_set_header X-Real-IP $remote_addr;
  328 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  329 + proxy_set_header Accept-Encoding "gzip";
  330 + }
  331 +
  332 + # 个人中心相关
  333 + location ^~ /home {
  334 + proxy_redirect off;
  335 + proxy_pass http://yohobuy;
  336 + proxy_set_header Host $host;
  337 + proxy_set_header X-Real-IP $remote_addr;
  338 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  339 + proxy_set_header Accept-Encoding "gzip";
  340 + }
  341 + location ^~ /home/message {
  342 + proxy_redirect off;
  343 + proxy_pass http://61.155.222.163;
  344 + proxy_set_header Host m.yohobuy.com;
  345 + proxy_set_header X-Real-IP $remote_addr;
  346 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  347 + proxy_set_header Accept-Encoding "gzip";
  348 + }
  349 + location = /home/orders/detail {
  350 + proxy_redirect off;
  351 + proxy_pass http://119.254.81.245;
  352 + proxy_set_header Host m.yohobuy.com;
  353 + proxy_set_header X-Real-IP $remote_addr;
  354 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  355 + proxy_set_header Accept-Encoding "gzip";
  356 + }
  357 + location = /home/orders/cancel {
  358 + proxy_redirect off;
  359 + proxy_pass http://119.254.81.245;
  360 + proxy_set_header Host m.yohobuy.com;
  361 + proxy_set_header X-Real-IP $remote_addr;
  362 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  363 + proxy_set_header Accept-Encoding "gzip";
  364 + }
  365 +
  366 + location / {
  367 + proxy_redirect off;
  368 + proxy_pass http://119.254.81.245;
  369 + proxy_set_header Host m.yohobuy.com;
  370 + proxy_set_header X-Real-IP $remote_addr;
  371 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  372 + proxy_set_header Accept-Encoding "gzip";
  373 + }
  374 +
  375 + location ~* \.(ico|woff|svg|eot|ttf|otf)$ {
  376 + expires 30d;
  377 + }
  378 + location =/crossdomain.xml {
  379 + expires 30d;
  380 + }
  381 + location =/sitemap.xml {
  382 + expires 1d;
  383 + }
  384 + location =/robots.txt {
  385 + expires 1d;
  386 + }
  387 +}
  388 +
  389 +
  390 +server
  391 +{
  392 + listen 80;
  393 + server_name sale.m.yohobuy.com;
  394 +
  395 + location / {
  396 + proxy_redirect off;
  397 + proxy_pass http://119.254.81.245;
  398 + proxy_set_header Host sale.m.yohobuy.com;
  399 + proxy_set_header X-Real-IP $remote_addr;
  400 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  401 + proxy_set_header Accept-Encoding "gzip";
  402 + }
  403 +
  404 +}
  405 +
  406 +server
  407 +{
  408 + listen 80;
  409 + server_name cuxiao.m.yohobuy.com;
  410 + location / {
  411 + proxy_redirect off;
  412 + proxy_pass http://101.201.176.121;
  413 + proxy_set_header Host cuxiao.m.yohobuy.com;
  414 + proxy_set_header X-Real-IP $remote_addr;
  415 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  416 + proxy_set_header Accept-Encoding "gzip";
  417 + }
  418 +}
  419 +
  420 +server
  421 +{
  422 + listen 80;
  423 + server_name huodong.m.yohobuy.com;
  424 + root /Data/PE/yohobuy/yohobuy/huodong.m.yohobuy.com/public;
  425 + location / {
  426 + proxy_redirect off;
  427 + proxy_pass http://yohobuy;
  428 + proxy_set_header Host $host;
  429 + proxy_set_header X-Real-IP $remote_addr;
  430 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  431 + proxy_set_header Accept-Encoding "gzip";
  432 + }
  433 +
  434 + location ~* \.(ico|woff|svg|eot|ttf|otf)$ {
  435 + expires 30d;
  436 + }
  437 + location =/crossdomain.xml {
  438 + expires 30d;
  439 + }
  440 + location =/sitemap.xml {
  441 + expires 1d;
  442 + }
  443 + location =/robots.txt {
  444 + expires 1d;
  445 + }
  446 +}