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

I have IndexIgnore * in a directory for which I don't want to allow directory listing.

Now, in a sub-directory, I want to override the IndexIgnore directive defined in parent directory and allow directory listing.

The documentation for IndexIgnore says

The IndexIgnore directive adds to the list of files to hide when listing a directory.

How do I allow directory listing for this sub-directory?

share|improve this question

2 Answers 2

FYI, what you are looking for does not seems to be possible: Re: [users@httpd] IndexIgnore

(I found this and your question looking for a solution to the same problem.)

share|improve this answer

Try Options -Indexes instead. If this .htaccess file applies to the sub-directory with Indexes, try specifying +Indexes.

Best practices often entail specifying these settings within httpd.conf instead if you're the system administrator. Also, it's more risky from a security perspective even to enable .htaccess files in the first place. If the Web server or application user were compromised, this would be one of the first places that could be written to without complete compromise.

If specified in the Apache configuration file instead, you would often specify Options within a Directory section.

Apache Docs

share|improve this answer

Your Answer

 
discard

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