The problem has been going on for two days and it's finally settled.
Problem:
Using PHP to construct an HTTP request to access its own Web server page, always report connection refused (111) error. Showing: Unable to connect to 127.0.0.1:80 (Connection refused)
In this computer Telnet 127.0.0.1 80 Access will also report Connection refused error,
However, it is always normal to access the server on the extranet.
Site to find a lot of posts there is no complete class-like, there are related posts that is the Hosts file configuration problem, but the changes to the hosts file did not change.
Finally a good check httpd.conf file, found that the original is here out of the question.
#Listen 211.*.*.*:80
Listen listening address is to write the external network address, the local access is 127.0.0.1 address, so there is a problem.
Modify socket access to the external network address, the problem solved.
--
Postscript. I have done experiments on my machine, listen address to 127.0.0.1 when the internal and external network can access. This machine cannot be accessed when you change to a foreign network.
Turn from: http://hi.baidu.com/xletian/blog/item/0b9136f372b6bf55352accac.html