jordanwb Posted September 13, 2008 Share Posted September 13, 2008 Mr server runs Gentoo Linux. If I were to make a folder and put an index.htm file in it, and pointed my browser to that folder, I get a directory listing instead of index.htm This does not happen with index.php files though. Quote Link to comment https://forums.phpfreaks.com/topic/124113-solved-apache-does-not-serve-indexhtm-files/ Share on other sites More sharing options...
wildteen88 Posted September 14, 2008 Share Posted September 14, 2008 You need to add index.htm to your DirectoryIndex directive in Apaches httpd.conf After applying the changes Apache will need to be restarted Quote Link to comment https://forums.phpfreaks.com/topic/124113-solved-apache-does-not-serve-indexhtm-files/#findComment-640988 Share on other sites More sharing options...
jordanwb Posted September 14, 2008 Author Share Posted September 14, 2008 Do I put that inside a VirtualHost directive, or inside the Directory directive? Quote Link to comment https://forums.phpfreaks.com/topic/124113-solved-apache-does-not-serve-indexhtm-files/#findComment-641131 Share on other sites More sharing options...
wildteen88 Posted September 14, 2008 Share Posted September 14, 2008 Its up to you. Adding it to a VirtualHost it'll only apply to that host. Whereas adding DirectoryIndex will apply globally. Quote Link to comment https://forums.phpfreaks.com/topic/124113-solved-apache-does-not-serve-indexhtm-files/#findComment-641132 Share on other sites More sharing options...
jordanwb Posted September 14, 2008 Author Share Posted September 14, 2008 so it would be like this: DirectoryIndex: index.htm, index.php Quote Link to comment https://forums.phpfreaks.com/topic/124113-solved-apache-does-not-serve-indexhtm-files/#findComment-641146 Share on other sites More sharing options...
wildteen88 Posted September 14, 2008 Share Posted September 14, 2008 remove the comma. Just separate each index with a space Quote Link to comment https://forums.phpfreaks.com/topic/124113-solved-apache-does-not-serve-indexhtm-files/#findComment-641148 Share on other sites More sharing options...
jordanwb Posted September 14, 2008 Author Share Posted September 14, 2008 Okay then. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/124113-solved-apache-does-not-serve-indexhtm-files/#findComment-641152 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.