在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/C++  Linux/ nginx 如何配置一個http://xxxxx/a 反向代理到服務器的http

nginx 如何配置一個http://xxxxx/a 反向代理到服務器的http://xxxx/b服務

1.nginx如何配置 用戶訪問http://xxx/a nginx 方向代理到服務器中的 http://locaohost:8088/b的服務?
現(xiàn)在訪問后,訪問的url編程了xxxx/b 沒有實現(xiàn)內(nèi)網(wǎng)轉(zhuǎn)發(fā)。
應該怎么配置???

2.
server {

listen       80;
server_name  xxxx;
location /a{
    proxy_pass http://localhost:8088/b/;
    proxy_redirect   off;
    proxy_set_header  Host $host:$server_port;
    proxy_set_header  X-Real-IP $remote_addr;
    proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header   X-Scheme $scheme;
 }

}

回答
編輯回答
久舊酒
location /a/{
    proxy_pass http://localhost:8088/b/;
}
2017年10月17日 15:29