【发布时间】:2017-04-17 13:43:05
【问题描述】:
我的 Apache DocumentRoot 目录中有一个 index.html 文件,但是当我转到我的 URL 时,我仍然得到一个 DocumentRoot 目录的目录列表,而不是显示的 index.html 文件。当我重新加载页面时,apache access_log 显示 200。有什么建议吗?
【问题讨论】:
-
DirectoryIndex设置了吗? httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex -
@Pekka웃 DirectoryIndex 已设置。 DocumentRoot /var/www/vhosts/ihlgt/httpdocs DirectoryIndex /var/www/vhosts/ihlgt/httpdocs/index.html 我上面列出的 DocumentRoot 目录是列出来的,所以对我来说似乎是正确的?
-
您不应该使用绝对路径。您没有告诉 apache 要加载的文件。你告诉 apache 在目录中寻找什么文件名
标签: html apache httpd.conf vhosts