Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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...]
</Directory>

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
add comment

2 Answers 2

up vote 6 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
1  
Upvote for reporting the fix. –  pboin Oct 1 '09 at 17:51
add comment

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.