PDA

View Full Version : Change defaults index extension


pascal
11-10-2004, 09:44 AM
Hello,

Now, for an interworx box, the default index extension is html or php.

A lot of users use htm as default extension index page : index.htm

How could we add index.htm as default index page too for all siteworx users ?

We'd like to have as default index page :
index.php
index.html
index.htm

Thanks for your help

IWorx-Paul
11-10-2004, 10:13 AM
Would probably be easiest to create a file named
/etc/httpd/conf.d/directoryindex.conf
and put
DirectoryIndex index.htm

in that file. You can add more variations also, like
DirectoryIndex index.htm index.shtml default.htm
and remember to restart apache so the changes take affect.

You can also put this in a .htaccess file in the html folder of the site if you want to do it only on a site by site basis.

Paul

pascal
11-10-2004, 11:07 AM
merci Paul heu sorry in english it will be better : thanks Paul :)

I was thinking they should be a general httpd.conf

But your solution is fine and works.

cool

Thanks

timryberg
11-10-2004, 07:59 PM
merci Paul heu sorry in english it will be better : thanks Paul :)

I was thinking they should be a general httpd.conf

But your solution is fine and works.

cool

Thanks

As I understand it httpd.conf is one of the files that *might* be alterd and overwritten in an update (_part_ of the reason for all of the indiividual domain.com.conf files) so the less you edit that the better.

Tim

IWorx-Chris
11-24-2004, 05:10 AM
We have yet to have any of our code touch the main httpd.conf. We may in the future change this setup but for now the httpd.conf is left untouched.

Chris

timryberg
11-24-2004, 07:58 PM
We have yet to have any of our code touch the main httpd.conf. We may in the future change this setup but for now the httpd.conf is left untouched.

Chris

Would you warn updaters that it was going to happen if it did? I for one edit these things locally and keep copies of both the original and edited file but a lot of people do it from the shell.

IWorx-Chris
11-26-2004, 12:43 AM
Would you warn updaters that it was going to happen if it did? I for one edit these things locally and keep copies of both the original and edited file but a lot of people do it from the shell.

We would obviously try, and I'd proceed as if we were going to edit them. If/when we do we'll obvioulsy try to not overwrite any changes but simply alter the values we're interested in and keep all else the same.

Chris

timryberg
11-26-2004, 05:15 PM
We would obviously try, and I'd proceed as if we were going to edit them. If/when we do we'll obvioulsy try to not overwrite any changes but simply alter the values we're interested in and keep all else the same.

Chris

Figured as much.

timryberg
11-26-2004, 05:26 PM
As I understand it httpd.conf is one of the files that *might* be alterd and overwritten in an update (_part_ of the reason for all of the indiividual domain.com.conf files) so the less you edit that the better.

Tim

For that the record, I mentioned this because I thought I remembered Chris or somebody saying this somewhere. I try not to assume these things, especially when I am talkint to other users :-)

Tim

pascal
11-26-2004, 11:56 PM
tim president !!!!