[Linux-disciples] Apache Directory Listing Problem
Brian Cooke
brian at voodoochild.org
Tue Mar 23 17:40:17 EST 2004
After more googling and tinkering, I discovered the problem. My hint
should have been in httpd.conf, where it says:
# Note: The order in which modules are loaded is important. Don't change
# the order below without expert advice.
When I moved the autoindex_module *before* dir_module (which controls
the DirectoryIndex directive) in my series of LoadModule directives,
everything worked like a charm.
Thanks for your help Adam.
Brian
Adam Kessel wrote:
>Weird. Your problem doesn't totally make sense.
>
>Are you doing all of this in httpd.conf, or some in the localized
>.htaccess? Just as suggestion, I would put Options Indexes in the
>.htaccess in /foo/bar, rather than httpd.conf, but this might be mostly a
>matter of taste if you're root on the system.
>
>Maybe it's something having to do with the order of things in the
>configuration file? This doesn't really sound right either.
>
>Is it only with / that you're having this problem, or other
>subdirectories where Options Indexes is disabled as well?
>
>On Fri, Mar 12, 2004 at 06:20:36PM -0500, Brian Cooke wrote:
>
>
>>Hi,
>>
>>I'm trying to get Apache to list contents of a particular directory for
>>me. It's proving to be difficult for me. Here's what's happening:
>>
>>Until now, I have not loaded the mod_autoindex module in Apache. If this
>>module is disabled, I can't get Directory Listings to work at all --
>>even if I have "Options Indexes" set in my configuration. I guess my
>>first question is whether or not that is expected? The documentation I'm
>>reading seems to suggest that all I need is "Options Indexes".
>>
>>Anyway, when I did enable it, it worked too well -- it enabled directory
>>listings for every directory on my whole site. I only wanted directory
>>listings for /foo/bar. So I removed "Options Indexes" from the root
>>directory and gave it only to the /foo/bar directory. This worked OK for
>>/foo/bar (I got a listing there, as I wanted), but when I tried to
>>access "/", I got an error message saying I didn't have permission to
>>access / on this server. I checked in the error logs and it says
>>"Directory index forbidden by rule". I don't understand this. It's
>>disabled by rule because I want it to go and look for any one of the
>>files I have set up in my DirectoryIndex directive (index.html,
>>index.shtml, index.php, etc...) -- which are present. I know this
>>because if I turn disable mod_autoindex, the pages listed in
>>DirectoryIndex load automatically. But then of course I don't get the
>>directory listing for /foo/bar. Any idea what I'm doing wrong?
>>
>>
>>------------------------------------------------------------------------
>>
>>_______________________________________________
>>Linux-disciples mailing list
>>Linux-disciples at lists.bostoncoop.net
>>http://lists.bostoncoop.net/mailman/listinfo/linux-disciples
>>
>>
More information about the Linux-disciples
mailing list