Take the 2-minute tour ×

I have the following block in my .conf file but when I load the appropriate URL (which points to a directory with just a dummy .txt file in it) I get the Apache 2 Test Page instead of a directory listing.

<Directory "/var/www/sites/www.some-site.com/public">
  Options Indexes
  [...other settings that are working fine...]

If I put an index.html file in there, it loads as expected.

The "other settings" I've omitted are for LDAP HTTP authentication and such, and they are also all working as expected.

There's no .htaccess file in the directory.

I just can't seem to get directory browsing working.

I've also tried +Indexes as well, still no luck.

share|improve this question

2 Answers 2

up vote 7 down vote accepted

boss found the issue. it was the conf.d/welcome.conf file. it had a LocationMatch directive that detected the absence of an index.html file and defaulted to the welcome page.

share|improve this answer
Upvote for reporting the fix. –  pboin Oct 1 '09 at 17:51

Basic steps:

  • Check and make sure there isn't an.htaccess file over-riding your settings (set AllowOverride None which might help)
  • Check and make sure your directory can be read by Apache
  • Check and make sure you don't have another <directory> flag that is over-riding your settings.
share|improve this answer
- no .htaccess file - directory is being read by apache - how would another directory flag override my settings? thanks. –  Teflon Ted Oct 1 '09 at 16:55
It can happen, though honestly I thought it unlikely in this case because your directory was so deep. One of the cool things about the directory directive is that you can next them over and over, so you can assign general stuff at / and then more specific stuff all the way down. Glad you found the issue. I'd never even used that directive before...Of course, I am a terrible .htaccess person, which is about the worst apache flaw you can have. Talk about unexpected behaviour. –  Satanicpuppy Oct 1 '09 at 19:14

Your Answer


