zoukankan      html  css  js  c++  java
  • Nginx记录Proxy_pass多个应用配置(转载)

    Nginx记录-Proxy_pass多个应用配置(转载)

     

    1. 在http节点下,加入upstream节点。

    upstream linuxidc { 
          server 10.0.6.108:7080; 
          server 10.0.0.85:8980; 
    }

      2.  将server节点下的location节点中的proxy_pass配置为:http:// + upstream名称,即“
    http://linuxidc”.


    location / { 
                root  html; 
                index  index.html index.htm; 
                proxy_pass http://linuxidc; 
    }

    ###################################################

    server {

        listen       8000;
        location / {
       proxy_pass http://10.1.166.216:9999/;
            index  index.html index.htm;
        }
        location /cdh {
       proxy_pass http://10.1.166.113:4690/;
            index  index.html login.html;
        }
        location /tomcat {
       proxy_pass http://10.1.166.171:8080/;
            index  index.html index.htm;
        }
    }
    为人:谦逊、激情、博学、审问、慎思、明辨、 笃行
    学问:纸上得来终觉浅,绝知此事要躬行
    为事:工欲善其事,必先利其器。
    态度:道阻且长,行则将至;行而不辍,未来可期
    转载请标注出处!
  • 相关阅读:
    mySQL安装的时候一直卡在starting server这里解决办法
    编译安装nginx
    用户访问网站原理及流程
    mysql备份及恢复
    sed
    mysql 基础
    nginx优化
    mysql 三种日志
    tr
    date
  • 原文地址:https://www.cnblogs.com/ios9/p/15709888.html
Copyright © 2011-2022 走看看