Apache显示索引/而不是默认索引html
我在我的Ubuntu 13.10上安装了apache2,它没有任何问题。 我可以通过在地址栏中键入localhost /来查看默认索引页面(位于/var/www/index.html中)
今天,在我将Ubuntu升级到14. 04之后,localhost服务器不再工作,而是显示/ page的索引
我试图重新安装所有东西(包括php5
, phpMyAdmin
和MySQL
),但问题仍然存在。 我该如何解决?
您应该编辑000-default.conf
文件
要编辑000-default.conf
您可以在具有root权限的文本编辑器中打开它,例如:
sudo -H gedit /etc/apache2/sites-available/000-default.conf
默认情况下, DocumentRoot
如下所示:
DocumentRoot /var/www/html
您需要将DocumentRoot
更改为:
DocumentRoot /var/www/
保存文件并退出。
在此之后,您必须重新启动Apache服务器:
sudo /etc/init.d/apache2 restart