Apache打开index.html /而不是index.html

时间:2016-02-18 08:27:16

标签: apache

我在ubuntu 14.04和apache 2.4上。

安装apache后,当我访问我的*** domain.com时,浏览器会加载我的*** domain.com/index.html/而不是我的*** domain.com/index.html,并且我看到了错误:

The requested URL /index.html/ was not found on this server.

我的网站 - 可用/ 000-default.conf:

ServerAdmin webmaster@localhost
DocumentRoot /var/www/html

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

知道我做错了吗?

1 个答案:

答案 0 :(得分:0)

尝试在顶部添加带有此文字的.htaccess文件:

DirectoryIndex index.html

您还应该查看.htaccess文件,而不是只是摆脱它,您可以做很多来加速您的网站使用它。除了管理好看的路径,以及许多其他事情。

相关问题