Apache環境,localhost 一直在載入中,但127.0.0.1可以正常訪問

來源:互聯網
上載者:User

Apache環境
localhost:82

問題:

  1. 瀏覽器輸入localhost:82,沒有響應(昨天還一切正常),但是127.0.0.1:82可以訪問

情況:
1.錯誤記錄檔如下
apache error.log

  1. httpd.conf 紅筆是我所更改過的地方

  1. hosts檔案如下

# 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 individual 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 individual# 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

回複內容:

Apache環境
localhost:82

問題:

  1. 瀏覽器輸入localhost:82,沒有響應(昨天還一切正常),但是127.0.0.1:82可以訪問

情況:
1.錯誤記錄檔如下
apache error.log

  1. httpd.conf 紅筆是我所更改過的地方

  1. hosts檔案如下

# 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 individual 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 individual# 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:檢查一下連接埠是不是正常監聽狀態。是不是apache環境問題。
2:看看phpinfo()能不能執行。 看看是不是php執行環境問題。
3:看看代碼是不是裡面有死迴圈或者bug。display_error開啟看看。
4:樓主,起碼貼個代碼或者頁面什麼啊。。這樣定位問題捉瞎狀態啊。囧

在httpd.conf檔案末尾加上
AcceptFilter http none
AcceptFilter https none
然後重啟看看

網上百度出來的結果不知道準不準

http://www.oschina.NET/questi...
http://httpd.apache.org/docs/...。

從錯誤記錄檔來看是ServerName綁定失敗, 所以httpd也還沒有正確啟動

根據錯誤資訊google, 找到的是這個, 先嘗試下吧
http://www.t086.com/code/apac...

如果還有問題, 嘗試修改ServerName?

1.把你的hosts檔案貼出來。
2.試試訪問127.0.0.1:82

感謝大家的熱心協助,我卸載了重新裝了一個,可以運行了

  • 相關文章

    聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    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.