![访问我的网站时 DNS 查找失败,出现代理错误](https://linux22.com/image/535301/%E8%AE%BF%E9%97%AE%E6%88%91%E7%9A%84%E7%BD%91%E7%AB%99%E6%97%B6%20DNS%20%E6%9F%A5%E6%89%BE%E5%A4%B1%E8%B4%A5%EF%BC%8C%E5%87%BA%E7%8E%B0%E4%BB%A3%E7%90%86%E9%94%99%E8%AF%AF.png)
直到今天早上,情况一直都很好。过去 6 个月,我的许多域名都可以访问
http://site1.myserver.com
http://site2.myserver.com
http://site3.myserver.com
http://site4.myserver.com
这些都是反向代理配置。每个配置上都有一些应用程序。
直到今天早上有人告诉我
http://site1.myserver.com/app1 不起作用,但是http://site1.myserver.com 可以访问
,但是http://site2.myserver.com 可以访问
,但是http://site3.myserver.com 可以访问
,但是http://site4.myserver.com 不是无障碍
在过去的 6 个月里,我没有改变任何 Apache 配置
(一切运行正常)。
浏览器中可以看到的错误是访问时 http://site1.myserver.com/app1
Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /app1.
Reason: DNS lookup failure for: myserver.com
错误也是一样的http://site4.myserver.com
那么我应该检查什么我已经检查了所有的 apache 日志,我可以看到并且
192.168.1.25 - - [10/Jan/2011:14:50:48 +0530] "GET /app1 HTTP/1.1" 502 531 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3"
Mon Jan 10 14:27:42 2011] [error] (113)No route to host: proxy: HTTP: attempt to connect to 192.168.1.3:80 (192.168.1.3) failed
[Mon Jan 10 14:27:42 2011] [error] ap_proxy_connect_backend disabling worker for (192.168.1.3)
[Mon Jan 10 14:27:44 2011] [error] proxy: HTTP: disabled connection for (192.168.1.3)
[Mon Jan 10 14:27:44 2011] [error] proxy: HTTP: disabled connection for (192.168.1.3)
[Mon Jan 10 14:27:44 2011] [error] proxy: HTTP: disabled connection for (192.168.1.3)
[Mon Jan 10 14:27:45 2011] [error] proxy: HTTP: disabled connection for (192.168.1.3)
[Mon Jan 10 14:27:45 2011] [error] proxy: HTTP: disabled connection for (192.168.1.3)
[Mon Jan 10 14:27:45 2011] [error] proxy: HTTP: disabled connection for (192.168.1.3)
[Mon Jan 10 14:27:45 2011] [error] proxy: HTTP: disabled connection for (192.168.1.3)
[Mon Jan 10 14:27:46 2011] [error] proxy: HTTP: disabled connection for (192.168.1.3)
[Mon Jan 10 14:27:47 2011] [error] proxy: HTTP: disabled connection for (192.168.1.3)
[Mon Jan 10 14:27:48 2011] [error] proxy: HTTP: disabled connection for (192.168.1.3)
[Mon Jan 10 14:27:48 2011] [error] proxy: HTTP: disabled connection for (192.168.1.3)
[Mon Jan 10 14:27:48 2011] [error] proxy: HTTP: disabled connection for (192.168.1.3)
[Mon Jan 10 14:35:29 2011] [error] [client 192.168.1.25] proxy: DNS lookup failure for: myserver.com returned by /app1
[Mon Jan 10 14:35:30 2011] [error] [client 192.168.1.25] proxy: DNS lookup failure for: myserver.com returned by /app1
[Mon Jan 10 14:35:30 2011] [error] [client 192.168.1.25] proxy: DNS lookup failure for: myserver.com returned by /app1
[Mon Jan 10 14:50:30 2011] [error] [client 192.168.1.25] proxy: DNS lookup failure for: myserver.com returned by /app1
[Mon Jan 10 14:50:48 2011] [error] [client 192.168.1.25] proxy: DNS lookup failure for: myserver.com returned by /app1
以及 site4.myserver.com
我明白了
[Mon Jan 10 14:57:40 2011] [error] [client 192.168.1.25] proxy: DNS lookup failure for: site4.myserver.com returned by /favicon.ico
[Mon Jan 10 14:57:40 2011] [error] [client 192.168.1.25] proxy: DNS lookup failure for: site4.myserver.com returned by /favicon.ico
[Mon Jan 10 14:57:43 2011] [error] [client 192.168.1.25] proxy: DNS lookup failure for: site4.myserver.com returned by /favicon.ico
[Mon Jan 10 15:02:38 2011] [error] [client <some external IP>] proxy: DNS lookup failure for: site4.myserver.com returned by /
[Mon Jan 10 15:03:04 2011] [error] [client <some external IP>] proxy: DNS lookup failure for: site4.myserver.com returned by /, referer: http://site4.myserver.com/
[Mon Jan 10 15:03:04 2011] [error] [client <some external IP>] proxy: DNS lookup failure for: site4.myserver.com returned by /favicon.ico
[Mon Jan 10 15:03:08 2011] [error] [client <some external IP>] proxy: DNS lookup failure for: site4.myserver.com returned by /, referer: http://site4.myserver.com/
[Mon Jan 10 15:03:08 2011] [error] [client <some external IP>] proxy: DNS lookup failure for: site4.myserver.com returned by /favicon.ico
[Mon Jan 10 15:03:10 2011] [error] [client <some external IP>] proxy: DNS lookup failure for: site4.myserver.com returned by /, referer: http://site4.myserver.com/
[Mon Jan 10 15:06:21 2011] [error] [client 192.168.1.25] proxy: DNS lookup failure for: site4.myserver.com returned by /
[Mon Jan 10 15:06:31 2011] [error] [client 192.168.1.25] proxy: DNS lookup failure for: site4.myserver.com returned by /, referer: http://site4.myserver.com/
[Mon Jan 10 15:26:03 2011] [error] [client 192.168.1.25] proxy: DNS lookup failure for: site4.myserver.com returned by /
答案1
如果您没有改变任何东西,那么显然其他东西已经改变了。
您需要从反向代理服务器检查 DNS 解析。
听起来您可能在代理指向的 DNS 服务器上有一个缓存的负面响应。
答案2
通过安装 prodns 和 dnsproxy 解决了这个问题。