Welcome to WebmasterWorld Guest from 50.17.79.100

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

"client denied by server configuration" error when using Indexing

     

wsmeyer

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

5+ Year Member



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?

William.

jdMorgan

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

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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

Jim

wsmeyer

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

5+ Year Member



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

C:/mysite/images/.htaccess

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

[images.mysite.com...]

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

[images.mysite.com...]

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.

William.

jdMorgan

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

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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...

Jim

 

Featured Threads

Hot Threads This Week

Hot Threads This Month