php - Apache环境,localhost 一直在加载中,但127.0.0.1可以正常访问

 人鱼同体 发布于 2022-11-29 09:19

Apache环境
localhost:82

问题:

  1. 浏览器输入localhost:82,没有响应(昨天还一切正常),但是127.0.0.1:82可以访问

情况:
1.错误日志如下
apacheerror.log

  1. httpd.conf红笔是我所更改过的地方

  1. hosts文件如下

#Copyright(c)1993-2009MicrosoftCorp.##ThisisasampleHOSTSfileusedbyMicrosoftTCP/IPforWindows.##ThisfilecontainsthemappingsofIPaddressestohostnames.Each#entryshouldbekeptonanindividualline.TheIPaddressshould#beplacedinthefirstcolumnfollowedbythecorrespondinghostname.#TheIPaddressandthehostnameshouldbeseparatedbyatleastone#space.##Additionally,comments(suchasthese)maybeinsertedonindividual#linesorfollowingthemachinenamedenotedbya'#'symbol.##Forexample:##102.54.94.97rhino.acme.com#sourceserver#38.25.63.10x.acme.com#xclienthost#localhostnameresolutionishandledwithinDNSitself.#127.0.0.1localhost#::1localhost127.0.0.1localhostlocalhost127.0.0.1#0.0.0.1mssplus.mcafee.com0.0.0.1mssplus.mcafee.com
4 个回答
  • 1:检查一下端口是不是正常监听状态。是不是apache环境问题。
    2:看看phpinfo()能不能执行。看看是不是php执行环境问题。
    3:看看代码是不是里面有死循环或者bug。display_error打开看看。
    4:楼主,起码贴个代码或者页面什么啊。。这样定位问题捉瞎状态啊。囧

    在httpd.conf文件末尾加上
    AcceptFilterhttpnone
    AcceptFilterhttpsnone
    然后重启看看

    网上百度出来的结果不知道准不准

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

    2022-11-29 11:50 回答
  • 从错误日志来看是ServerName绑定失败,所以httpd也还没有正确启动

    根据错误信息google,找到的是这个,先尝试下吧
    http://www.t086.com/code/apac...

    如果还有问题,尝试修改ServerName?

    2022-11-29 11:50 回答
  • 1.把你的hosts文件贴出来。
    2.试试访问127.0.0.1:82

    2022-11-29 11:50 回答
  • 感谢大家的热心帮助,我卸载了重新装了一个,可以运行了

    2022-11-29 11:50 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有