Nginx 反向代理
Posted 程序之家
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Nginx 反向代理相关的知识,希望对你有一定的参考价值。
upstream test { server 127.0.0.1:8080; } upstream v2.c.y.com { server 1.159.227.3; } upstream auth.y.com { server 1.159.227.3; } server { listen 80; server_name localhost; #charset koi8-r; #access_log logs/host.access.log main; location /api/userCredit/calculateLocalPayment { proxy_pass http://test; root html; index index.html index.htm; } location /api/userCredit/getBalance { proxy_pass http://test; root html; index index.html index.htm; } location /api/userCredit/pay { proxy_pass http://test; root html; index index.html index.htm; } location / { proxy_pass http://v2.clientapi.y.com; root html; index index.html index.htm; } location /token { proxy_pass http://auth.y.com; root html; index index.html index.htm; }
以上是关于Nginx 反向代理的主要内容,如果未能解决你的问题,请参考以下文章