[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-developers] Changing the default html page
- Subject: Re: [cobalt-developers] Changing the default html page
- From: Dave Stevens <dstevens@xxxxxxxxxxx>
- Date: Thu Mar 23 00:21:46 2000
>How do I define a default html page other than index.html? Eh - I want
>home.htm to be used when I just enter the domain name.
Use the Apache "DirectoryIndex" directive. It's in the VirtualHost section
of the site you wish to change, in the httpd.conf file in /etc/httpd/conf .
Telnet into your RaQ, change to su, and edit it with emacs or vi.
It's described at http://www.apache.org/docs/mod/mod_dir.html#directoryindex .
If you really wanted to look cool ;-), you could just add home.htm to the
DirectoryIndex directive in your main server config. Apache looks at each
entry in the directive, and if it's not there it goes to the next listing.
For example, if I have "DirectoryIndex home.htm index.html index.cgi
billgates.php3 " it keeps looking to see if any of the files match, if so,
it displays the first match it finds. The advantage of this method, is
that any other site on that RaQ can use this, too.
Though it's probably already defined in mime.types, you may have to add
"AddType text/html .htm" (no quotes) to that virtual host configuration.
You can see it is by reading /etc/httpd/conf/mime.types. I'd bet that .htm
is already an included mime type.
Dave