gpt4 book ai didi

Nginx。如果为空 URI。如果是空域。地点。正则表达式

转载 作者:行者123 更新时间:2023-12-04 18:29:11 27 4
gpt4 key购买 nike

我正在使用上游模块来平衡我的网站。出于某种原因,我必须将一些请求重定向到指定的服务器。简而言之:我想将 domain.com 重定向到指定的服务器,domain.com/anything 可以由上游模块提供服务。因此,如果请求中只有域而没有其他内容。

   location [here_something_i_dont_know]/ {
proxy_pass http://0.0.0.0:9000/;
access_log off;
}

感谢您的帮助!

最佳答案

   location = / {        proxy_pass           http://0.0.0.0:9000/;        access_log      off;   }   location / {        proxy_pass           http://another_upstream;        access_log      off;   }

关于Nginx。如果为空 URI。如果是空域。地点。正则表达式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4434975/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com