亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

關于nginx配置,轉發功能,腫么破

關于nginx配置,轉發功能,腫么破

肥皂起泡泡 2018-10-24 19:11:13
大佬們,關于nginx配置:所有請求url為:/api/xxx (以/api開頭為判斷依據),均轉發到 http:target.com/xxx(去掉/api)(請注意,并不是這樣:http:target.com/api/xxx)這個邏輯咋實現。。我現在是這么做的        location ^~ /api {            proxy_pass  http://target.com;            proxy_redirect off;            proxy_set_header HOST $host;            proxy_set_header X-Real-IP $remote_addr;            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;            client_max_body_size 10m;            client_body_buffer_size 128k;            proxy_connect_timeout 90;            proxy_send_timeout 90;            proxy_read_timeout 90;            proxy_buffer_size 4k;            proxy_buffers 4 32k;            proxy_busy_buffers_size 64k;            proxy_temp_file_write_size 64k;         }但肯定不行,/api 也帶過去了。。搜半天沒搜到解決方案。。求大佬指點~
查看完整描述

1 回答

  • 1 回答
  • 0 關注
  • 677 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號