阿帕奇没有返回的index.php为默认 [英] apache not returning index.php as default

查看:320
本文介绍了阿帕奇没有返回的index.php为默认的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近与LAMP $安装p p $一个DigitalOcean滴。
去了,我上载网站(包括的index.php)到/ var / WWW

I recently made a DigitalOcean droplet with LAMP pre-installed. Went and uploaded my website (including index.php) to /var/www

阿帕奇刚刚返回它的作品!页,
我必须手动的index.php添加到我的网址

Apache just returns the It Works! page, I have to manually add /index.php to my url

东西我曾尝试:


  1. 由含有.htaccess文件的DirectoryIndex的index.php

  2. 添加的DirectoryIndex index.php文件来apache2.conf

  3. 设置的index.php首先在dir.conf

  4. 制作一个index.html,没有显示,无论是。

  1. Made an .htaccess file containing "DirectoryIndex index.php"
  2. Adding DirectoryIndex index.php to apache2.conf
  3. Set index.php first in dir.conf
  4. Making an index.html, didn't show that either.

编辑:
 这里是我的apache2.conf文件: http://pastebin.com/BMgiNdiD

推荐答案

您丢失了以下配置:

#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
    DirectoryIndex index.php index.pl index.cgi index.asp index.shtml index.html index.htm \
               default.php default.pl default.cgi default.asp default.shtml default.html \
               default.htm home.php home.pl home.cgi home.asp home.shtml home.html home.htm
</IfModule>

这篇关于阿帕奇没有返回的index.php为默认的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆