码迷,mamicode.com
首页 > 其他好文 > 详细

Nginx 反向代理

时间:2018-08-22 13:17:43      阅读:192      评论:0      收藏:0      [点我收藏+]

标签:pst   .com   serve   list   div   代理   proxy   index   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 反向代理

标签:pst   .com   serve   list   div   代理   proxy   index   nginx   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!