我正在使用Windows 2016,Apache 2.4。我需要上传静态网页内容,起点是index.htm,而不是index.html。
主机文件
127.0.0.1 help.numbooks.com我的错误

它显示目录列表,而不是正确地呈现htm文件。
我的入口点文件http://help.numbooks.com/index.htm
但是使用http://help.numbooks.com它会显示目录列表,这是预料不到的。
我的尝试

<VirtualHost *:80>
ServerName help.numbooks.com
DocumentRoot "C:\vy\Frameless"
DirectoryIndex index.htm
<Directory "C:\vy\Frameless">
AllowOverride All
</Directory>
ErrorLog "C:\help.log"
CustomLog "C:\help_custom.log" common
</VirtualHost>(当然,我在更改配置后重新启动Apache服务)。如何在Apache2.4中正确地显示index.htm与原始index.html一样?
发布于 2021-05-29 15:54:22
在httpd.conf中,更改
<IfModule dir_module>
DirectoryIndex index.html
</IfModule>至
<IfModule dir_module>
DirectoryIndex index.htm
</IfModule>https://serverfault.com/questions/1065081
复制相似问题