linux – 如何在执行proxy_pass时强制nginx解析DNS(动态主机名)?
发布时间:2020-05-23 17:26:52 所属栏目:Linux 来源:互联网
导读:我正在使用运行在CentOS上的nginx / 0.7.68,具有以下配置: server { listen 80; server_name ***; index index.html index.htm index.php default.html default.htm default.php; location / { r
|
我正在使用运行在CentOS上的nginx / 0.7.68,具有以下配置: server {
listen 80;
server_name ***;
index index.html index.htm index.php default.html default.htm default.php;
location / {
root /***;
proxy_pass http://***:8888;
index index.html index.htm;
}
# where *** is my variables
proxy_pass是指IP经常更改的DNS记录. Nginx缓存过时的IP地址,导致对错误的IP地址的请求. 当它过时时,如何阻止nginx缓存IP地址? 解决方法这是一个有趣的问题,AFAIK不能很好地运作.您可以尝试使用 upstream模块并使用指令进行故障转移,以查看它是否可以作为黑客攻击.2018年编辑:很多事情发生了变化.检查@ohaal的答案,以获得有关此问题的真实信息. (编辑:安卓应用网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
