【发布时间】:2014-02-18 18:29:56
【问题描述】:
我最近制作了一个预装了 LAMP 的 DigitalOcean 液滴。 将我的网站(包括 index.php)上传到 /var/www
Apache 只返回 It Works!页, 我必须手动将 /index.php 添加到我的网址
我尝试过的事情:
- 制作了一个包含“DirectoryIndex index.php”的.htaccess文件
- 将
DirectoryIndex index.php添加到apache2.conf - 在dir.conf中先设置index.php
- 制作 index.html,也没有显示。
编辑: 这是我的 apache2.conf 文件:http://pastebin.com/BMgiNdiD
【问题讨论】:
-
你的 apache2.conf 中有什么?设置了什么目录?此外,您已将 index.PHP 设置为目录索引,因此 .html 页面不会覆盖 php 索引页面
标签: apache lamp digital-ocean directoryindex