Apache DirectoryIndex

Apache DirectoryIndex directive allow you to set file name for INDEX page.
On a default installation of Apache web server, only index.html will be considered as INDEX document. That is name of your first page should be index.html
This is set in apache configuration file (httpd.conf)
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
# The index.html.var file (a type-map) is used to deliver content-
# negotiated documents.  The MultiViews Option can be used for the
# same purpose, but it is much slower.
DirectoryIndex index.html index.html.var
If you need index.php or any other file used as extension, you need to change the DirectoryIndex directive.
DirectoryIndex index.html index.html.var index.php default.html default.htm default.php
Now any of the above extenstion is present in your directory, it will be shown as INDEX for the folder.

Posted in Uncategorized. Bookmark the permalink.