Apache 不会在我的 Raspberry Pi 上提供页面

Apache won't serve pages on my Raspberry Pi

我已经在我的 Raspberry Pi(来自 Jessie 存储库)和 Apache2 上安装了 PHP 5.6。当我访问 http://192.168.2.50/(Pi 的 IP 地址)时,它不为 ~/var/www/ 中的 index.phpindex.html 文件提供服务。

就在一个小时前,我还在 运行 PHP 5.4 来自 Wheezy 存储库,它运行良好。我检查了 apache 是否为 运行(使用 top),我看到有 apache2 进程。为了更加确定,我使用了 service apache2 stop 然后 service apache2 start 来保证网络服务器是 运行。

http://192.168.2.50 上的当前输出是:

Not Found

The requested URL / was not found on this server.

Apache/2.4.10 (Raspbian) Server at 192.168.2.50 Port 80

有什么建议可以让 Pi 服务 PHP/webfiles 再次正确吗?

这很容易 'fix'。新 PHP 的根文件夹是 ~/var/www/html/。一切正常。祝未来的解决方案寻求者好运 ;)