Apache 2将不会服务于index.php

如果我导航到他们,我的testing服务器将愉快地服务于PHP页面。

但是,在一个虚拟主机上,我有一个index.php。 如果我inputurl,这个页面将被提供。 但是,如果我只是input' http:// mysite / ',那么index.php将不会被提供。

我使用Ubuntu上的PHP模块运行Apache 2.2。

您需要在您的apacheconfiguration中设置DirectoryIndex指令。

就像是

DirectoryIndex index.php index.html index.htm 

它可以出现在您的服务器configuration,虚拟主机,目录或.htaccess文件中。

完整的信息: http : //httpd.apache.org/docs/2.0/mod/mod_dir.html