403 禁止访问 index.php ;再次 :c

403 禁止访问 index.php ;再次 :c

我在 apache 配置方面遇到了问题,无法运行 php:当我访问 localhost (index.html) 时,我得到了我想要的内容,但是当我运行包含一些简单代码的 index.php 时,我得到了“403 forbidden”。我尝试在 index.php 上使用 chmod 777(请不要杀了我 :p),但没有任何变化。我在 Google 上搜索了我的问题,尝试了不同的配置... 感谢任何帮助 c:

答案1

问题解决了 !

我跑过去netstat -putan,然后我看到了lighttpd 在 apache 旁边的 80 端口上运行,由于 403 禁止:
[...]
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 918/lighttpd [...]
您还可以通过停止 apache 来查看 http 服务器是否正在运行sudo service apache2 stop,然后查看http://本地主机是否启动。如果没有,请查看 George 的评论(顺便说一句,谢谢 :D)它可能会对您有所帮助
只需通过以下方式删除 lighttpd,apt-get remove lighttpd*
我希望这对你们中的一些人有所帮助 c:

相关内容