V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Achilless
V2EX  ›  问与答

nginx 统计 server_name 对应的 upstream 节点 server 明细信息

  •  
  •   Achilless · Oct 23, 2020 · 578 views
    This topic created in 2024 days ago, the information mentioned may be changed or developed.

    upstream main {

      server web1.local:80;
      server web2.local:80;
      server web3.local:80;
    }
    
     server {
      listen 80;
      server_name example.com;
      location / {
        proxy_pass http://main;
      }
    }
    
    比如这个所有的 server 在一个文件夹,upstream 在一个文件夹,每 server 和 upstream 对应一个 conf 文件,这样的文件有上千个。 
    现在想到的是 python 文本处理提取,但是感觉会有很多坑
    有什么简单的方法统计吗
    
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3093 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 13:46 · PVG 21:46 · LAX 06:46 · JFK 09:46
    ♥ Do have faith in what you're doing.