2014-11-06 43 views
1

使用以下职位:的Apache2在Ubuntu 14.04将不加载的index.php

我已经改变了我/etc/apache2/apache2.conf文件是以下:

<Directory /var/www/> 
    Options Indexes FollowSymLinks 
    AllowOverride All 
    Require all granted 
</Directory 

而且我创建的文件/var/www/html/.htaccess是以下几点:

DirectoryIndex Index.php index.php Index.html index.html Index.htm index.htm 

当我去我的网站,默认的页面依然是(它的工作!)index.html文件。

如何配置Apache优先index.php?

回答

1

是你的DocumentRoot /var/www/还是/var/www/html/(后者是你说你有你的.htaccess文件)?

如果.htaccess/var/www/html/比我快猜你需要更新你的Apache配置为:

<Directory /var/www/html/>