homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

"client denied by server configuration" error when using Indexing

 9:48 pm on Dec 11, 2008 (gmt 0)

I've just setup a subweb on my site like images.mysite.com and am using an .htaccess file like this:

Options +Indexes
IndexOptions FancyIndexing NameWidth=* XHTML SuppressColumnsorting SuppressRules SuppressHTMLPreamble HTMLTable
IndexOptions FoldersFirst
addiconbytype (IMG,/icons/movie.gif) image/*
addiconbytype (SND,/icons/sound.gif) audio/*
addiconbytype (TXT,/icons/text.gif) text/*
AddIcon /icons/text.gif .php
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^
AddIcon /icons/back.gif ..
DefaultIcon /icons/unknown.gif

Everything is working fine except that in my Apache error log I am getting a bunch of this:

"client denied by server configuration: C:/mysite/images/.htaccess"

After some investigating, it appears that when creating the page it checks to see if there is a parent directory so that it can display the parent directory link or not. It's this check that is causing the errors in my Apache log as when your in the root folder there is no parent.

Has anyone else experienced this? Is there a work around?




 9:55 pm on Dec 11, 2008 (gmt 0)

Where is this .htaccess file located -- What is the filepath of this file, and what is the filepath of your Web root folder?



 10:13 pm on Dec 11, 2008 (gmt 0)

Thanks for your quick response, I may not be explaining it that well but the .htaccess file is in the root:


If a visitor is in a folder on the subweb, like


No error is generated and everything is displayed as expected, including a "parent directory" link to navigate up a folder.

If a visitor is in the root, like


then no "parent directory" link is displayed and the error:

"client denied by server configuration: C:/mysite/images/.htaccess"

is recorded in the Apache error log.

I could be wrong but I think the error is being generated when Apache is determining whether or not to us the "parent directory" link.



 10:27 pm on Dec 11, 2008 (gmt 0)

Because of the filepath listed in the error message, it appears that something is trying to access the /images/.htaccess file -- These error messages always show the filepath for which the request failed.

So the question is, what is trying to read /images/.htaccess, and why?

I don't know much about operating with indexes enabled, as I've never had a site that would be useful like that, and with my 'regular sites' I consider it a (slight) security risk. But I do find it odd that mod_dir would invoke a read of .htaccess at the level where it could cause a logged error. It should "know" not to try to fetch above DocumentRoot. So, you might want to look around for any rewrites that might be confusing the issue here, either in your .htaccess files or in your server config file.

Sorry I can't be of more help...


Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved