PHP 应用程序 通过端口 80 连接回托管服务器


PHP Application Connecting back to the hosting server at port 80

从昨天开始,我一直在这个问题上敲打我的头 如果你能帮忙,我将不胜感激。

设置:

我们的网站配置为在IP 22.33.44.54(例如)上运行。服务器分配了一个辅助 IP 作为 22.33.44.55。

问题:

昨天我们的服务器过载了。它非常频繁地访问MaxClient(通常我们一次在服务器上有大约85-90个连接)。这通常不会发生,因此我们开始调查并发现 Port80 上大约 45-50% 的连接来自我们自己的 IP 运行网站。服务器支持人员说问题出在 PHP 应用程序上,它正在连接回 Port80 上的服务器。

来自 Apache access_log:

22.33.44.55 - - [21/Oct/2013:19:14:39 +0100] 200 /home/xxxxx/public_html/index.php 303396 www.example.com "-" "-"  
22.33.44.54 - - [21/Oct/2013:19:14:40 +0100] 302 /home/xxxxx/public_html/8973.jpg 317 example.com "-" "-"  
22.33.44.55 - - [21/Oct/2013:19:14:30 +0100] 200 /home/xxxxx/public_html/index.php 303396 www.example.com "-" "-"  
22.33.44.54 - - [21/Oct/2013:19:14:42 +0100] 302 /home/xxxxx/public_html/8973.jpg 317 example.com "-" "-"

对代码进行 grep 并搜索 127.0.0.1、IP 22.33.44.55 和 localhost。

find . -name '*.php | xargs grep 127.0.0.1
find . -name '*.php | xargs grep localhost

你可能在那里的某个地方include ("http://localhost/mylibrary.php");,要么是贪婪的搜索和替换,要么是实习生。