0

I am using Windows Server 2016, Apache httpd 2.4. I need upload static web content, start point is index.htm , not index.html .

host file

127.0.0.1 help.numbooks.com

My error

enter image description here

It show directory listing, not render htm file correctly.

My entry-point file http://help.numbooks.com/index.htm

But use http://help.numbooks.com it show listing of directories, it was not expected.

My try

enter image description here

<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>

(Of course, I restart Apache services after change configuration). How to show index.htm correctly like original index.html in Apache 2.4?

Do Nhu Vy
  • 151
  • 1
  • 6

1 Answers1

1

In httpd.conf, change

<IfModule dir_module>
    DirectoryIndex index.html
</IfModule>

to

<IfModule dir_module>
    DirectoryIndex index.htm
</IfModule>
Do Nhu Vy
  • 151
  • 1
  • 6