os x Mojave上的Apache不提供index.php

时间:2018-10-24 15:07:25

标签: php apache homebrew macos-mojave

我在相对较新的Mojave安装上酿造了Apache和PHP。在httpd.conf中,我指定“ DirectoryIndex index.php index.html”。当我在Chrome的地址栏中输入127.0.0.1时,出现以下错误“此页面无法正常工作127.0.0.1没有发送任何数据。ERR_EMPTY_RESPONSE ”。我index.php的内容是phpinfo()。当我将DirectoyIndex的顺序更改为“ DirectoryIndex index.html index.php”时,一切正常,并提供了index.html。实际上似乎根本没有提供任何php文件。任何建议可能出了问题将不胜感激。谢谢。

1 个答案:

答案 0 :(得分:0)

从PHP5.6切换到PHP7.2解决了该问题。