Connection refused error

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.