【发布时间】:2018-09-18 16:41:19
【问题描述】:
我正在开发我的第一个 CakePHP 项目,我已经完成了以下工作:
- 从 (http://cakephp.org/) 下载了 CakePHP 源代码
- 重命名为 sampleapp 并将整个文件夹复制到 /var/www/html
- sudo /etc/init.d/httpd 重启
当我去http://localhost 时,它会显示正确的 Centos Apache 欢迎页面。但是当我转到http://localhost/sampleapp 时,它会显示目录结构
http://localhost/sampleapp
Parent Directory -
app/ 05-Jan-2013 14:20 -
build.properties 05-Jan-2013 14:20 177
build.xml 05-Jan-2013 14:20 8.6K
html/ 05-Jan-2013 14:20 -
index.php 05-Jan-2013 14:20 1.4K
lib/ 05-Jan-2013 14:20 -
plugins/ 05-Jan-2013 14:20 -
vendors/ 05-Jan-2013 14:20
我在这里缺少什么?我检查了 .htaccess 文件也在那里
通过一些 SO 研究,我将以下行添加到 /etc/httpd/conf/httpd.conf
AddType application/x-httpd-php .php
并重新启动 Apache,但它没有工作。
我正在使用
- Apache2
- CakePHP 2.2.4
- Centos
【问题讨论】: