Why is Apache not listing any files in an open directory?
March 25, 2008 9:46 PM Subscribe
I've been helping my friend setup his personal website and we have been muddling through with plenty of help from google and a little bit of luck.
But recently, I've been stumped by a persistent problem with a directory containing some files. Here's the scenario - my friend shares his RSS reading list as an OPML file. In addition, he wants to try and show how his reading list has evolved by archiving older versions of his reading list in a folder. He also wants to allow other people to browse this archive folder.
It seemed like we should be able to achieve this using .htaccess files, but unfortunately it's not working like we expected.
The .htaccess file that we came up with is as follows:
In the root folder of the linkblog, there is a htaccess file that has the following entry:
Additional info: The server is hosted at GoDaddy.
If the question seems long and rambly, apologies - this is my first question to AskMeFi and I figured it's better to go overboard with the data points :)
The .htaccess file that we came up with is as follows:
Options +Indexes +MultiViews +FollowSymlinksThe directory can be viewed at this link. At first I thought it might be a problem with file permissions, so I tried CHMOD'ing all files to 777 but the folder remains empty. Next, I tried to see if any file was getting displayed and uploaded a text file and a jpeg to the directory and found that nothing changes. So it isn't a problem with unrecognized file types, nothing is getting picked up!
IndexOptions FancyIndexing
order allow,deny
allow from all
In the root folder of the linkblog, there is a htaccess file that has the following entry:
# BEGIN Prevent Directory ListingI tried to force an override by including an Override Indexes command as follows:
IndexIgnore *
# END Prevent Directory Listing
< Directory "/home/content/linkblog/resources/opml_archive" >That only resulted in a "500 Internal Server Error".
AllowOverride Indexes
Additional info: The server is hosted at GoDaddy.
If the question seems long and rambly, apologies - this is my first question to AskMeFi and I figured it's better to go overboard with the data points :)
Actually, "IndexIgnore *" is almost definitely doing this. I would first comment this out to make sure this is causing the problem. If IndexIgnore is necessary, I would create an .htaccess file in opml_archive containing "Indexignore .htaccess". However, I don't know if this overrides previous settings or just adds ".htaccess" to the ignore list.
posted by null terminated at 10:16 PM on March 25, 2008
posted by null terminated at 10:16 PM on March 25, 2008
Best answer: To be clear, removing IndexIgnore should fix the problem. If you want to not list indexes in other directories, you should replace "IndexIgnore *" with "Options -Indexes". This should cause "Options +Indexes" to work on subdirectories (this should be put in an .htaccess file in opml_archive). I haven't tested any of this.
posted by null terminated at 10:21 PM on March 25, 2008 [1 favorite]
posted by null terminated at 10:21 PM on March 25, 2008 [1 favorite]
Response by poster: null terminated: " The "Options -Indexes" change fixed it!
I can now see files in the opml_archive directory while the parent directory still returns a 403 error (I had the IndexIgnore on because it was a "recommended" security practice for Wordpress blogs).
Thank you so much!
posted by your mildly obsessive average geek at 10:48 PM on March 25, 2008
I can now see files in the opml_archive directory while the parent directory still returns a 403 error (I had the IndexIgnore on because it was a "recommended" security practice for Wordpress blogs).
Thank you so much!
posted by your mildly obsessive average geek at 10:48 PM on March 25, 2008
« Older How can I get my cat to stop knocking stuff over? | He Can Pluck My Strings Any Time. Newer »
This thread is closed to new comments.
posted by null terminated at 10:11 PM on March 25, 2008