Friday, August 10, 2007

Enable default document in Apache!

This is simple stuff to write and do but when you start something new, it is always interesting. In IIS, we can enable default document. This would mean if someone hit the url like http://localhost/test/sample/ without specifying the actual page they are shooting at, the IIS must be able to return a default page. So you can configure that easily in IIS using Inet Manager.


To do the equivalent in Apache it is, we need to add the below line in the httpd.conf


## DirectoryIndex: sets the file that Apache will serve if a directory# is requested.

#


DirectoryIndex index.html

DirectoryIndex index.php

0 comments: