In the Apache environment, localhost is being loaded, but 127.0.0.1 can be accessed normally.

Source: Internet
Author: User
Apache environment localhost: 82 problem: The browser entered localhost: 82, no response (yesterday, everything was normal), but 127.0.0.1: 82 can be accessed: 1. the error log is as follows: apacheerror. loghttpd. the conf red pen is where I changed the hosts file as follows {generation...

Apache environment
Localhost: 82

Problem:

  1. Enter localhost: 82 in the browser and there is no response (everything was normal yesterday), but 127.0.0.1: 82 can access

Situation:
1. the error log is as follows:
Apache error. log

  1. Httpd. conf red pen is the place I have changed

  1. The hosts file is as follows:

# Copyright (c) 1993-2009 Microsoft Corp.## This is a sample HOSTS file used by Microsoft TCP/IP for Windows.## This file contains the mappings of IP addresses to host names. Each# entry should be kept on an inpidual line. The IP address should# be placed in the first column followed by the corresponding host name.# The IP address and the host name should be separated by at least one# space.## Additionally, comments (such as these) may be inserted on inpidual# lines or following the machine name denoted by a '#' symbol.## For example:## 102.54.94.97 rhino.acme.com # source server# 38.25.63.10 x.acme.com # x client host# localhost name resolution is handled within DNS itself.# 127.0.0.1 localhost# ::1 localhost127.0.0.1 localhostlocalhost 127.0.0.1#0.0.0.1 mssplus.mcafee.com0.0.0.1    mssplus.mcafee.com

Reply content:

Apache environment
Localhost: 82

Problem:

  1. Enter localhost: 82 in the browser and there is no response (everything was normal yesterday), but 127.0.0.1: 82 can access

Situation:
1. the error log is as follows:
Apache error. log

  1. Httpd. conf red pen is the place I have changed

  1. The hosts file is as follows:

# Copyright (c) 1993-2009 Microsoft Corp.## This is a sample HOSTS file used by Microsoft TCP/IP for Windows.## This file contains the mappings of IP addresses to host names. Each# entry should be kept on an inpidual line. The IP address should# be placed in the first column followed by the corresponding host name.# The IP address and the host name should be separated by at least one# space.## Additionally, comments (such as these) may be inserted on inpidual# lines or following the machine name denoted by a '#' symbol.## For example:## 102.54.94.97 rhino.acme.com # source server# 38.25.63.10 x.acme.com # x client host# localhost name resolution is handled within DNS itself.# 127.0.0.1 localhost# ::1 localhost127.0.0.1 localhostlocalhost 127.0.0.1#0.0.0.1 mssplus.mcafee.com0.0.0.1    mssplus.mcafee.com

1: Check whether the port is in normal listening status. Is it an apache environment problem.
2: Check whether phpinfo () can be executed. Check whether the php execution environment is faulty.
3: Check whether the code contains an endless loop or a bug. Display_error.
4: The poster, at least post a code or page .. In this way, locate the problem and identify the blind state. Bytes

Add
AcceptFilter http none
AcceptFilter https none
Then restart the instance.

I am not sure about the results from Baidu on the Internet.

Http://www.oschina.NET/questi...
Http://httpd.apache.org/docs /....

From the error log, the ServerName binding failed, so httpd has not started properly.

According to the error message google, find this. please try it first.
Http://www.t086.com/code/apac...

If there is still a problem, try to modify ServerName?

1. put yourHostsPaste the file.
2. try accessing127.0.0.1: 82

Thank you for your enthusiastic help. I uninstalled and re-installed one to run it.

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.