首页 > 其他 > 详细

Nginx 反向代理

时间:2018-08-22 13:02:39      阅读:196      评论:0      收藏:0      [点我收藏+]
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 反向代理

原文:https://www.cnblogs.com/ahuo/p/9516918.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!