phpStudy启动时Apache红色(启动失败)

先是参考以下文章:

https://www.360kuai.com/detail?url=9e0b0adf7d9696a12&cota=3&kuai_so=1&tj_url=xz&sign=360_57c3bbd1&refer_scene=so_1

以前的套路。检查端口占用。

结果并没有说什么端口。

然后检查windows事件错误,也找不到。

然后检查apache的日志记录,参考:

https://blog.csdn.net/ty_hf/article/details/55504719

结果根本就没有errorlog.

???

最后,https://www.jianshu.com/p/776e742dee9b

解决办法:找到phpstudy安装的对应路径D:\phpStudy\PHPTutorial\Apache\bin\httpd.exe查看错误解决即可

C:\Users\Administrator>D:\phpStudy2018\PHPTutorial\Apache\bin\httpd.exe
httpd.exe: Syntax error on line 486 of D:/phpStudy2018/PHPTutorial/Apache/conf/httpd.conf: Synt
ax error on line 555 of D:/phpStudy2018/PHPTutorial/Apache/conf/vhosts.conf: D:/phpStudy20
18/PHPTutorial/Apache/conf/vhosts.conf:559: was not closed.\r\nD:/phpStudy2018/PHPT
utorial/Apache/conf/vhosts.conf:555: was not closed.

一看,不知道为什么最后少了两句:

    

加上就可以了

你可能感兴趣的:(apache)