本文介绍了阿帕奇没有返回的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
东西我曾尝试:
- 由含有.htaccess文件的DirectoryIndex的index.php
- 添加
的DirectoryIndex index.php文件
来apache2.conf - 设置的index.php首先在dir.conf
- 制作一个index.html,没有显示,无论是。
- Made an .htaccess file containing "DirectoryIndex index.php"
- Adding
DirectoryIndex index.php
to apache2.conf - Set index.php first in dir.conf
- Making an index.html, didn't show that either.
编辑:
这里是我的apache2.conf文件:
推荐答案
您丢失了以下配置:
#
# 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为默认的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!