www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Sweeting <Scottswebs...@hotmail.com>
Subject general/9981: <Directory> will not parse in .htaccess file
Date Wed, 27 Feb 2002 18:46:21 GMT

>Number:         9981
>Category:       general
>Synopsis:       <Directory> will not parse in .htaccess file
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          support
>Submitter-Id:   apache
>Arrival-Date:   Wed Feb 27 10:50:00 PST 2002
>Originator:     Scottswebsite@hotmail.com
>Release:        v1.3.22
Microsoft Windows 98 (Second Edition)
PHP v4.1.1 (Win32)
MySQL v3.23.47 (Win32)
I am using Apache on my computer as a development server and to date, I have not had any problems.
 My web site will be uploaded to my host's server, which is running Apache v1.3.22 as a production
server.  Unfortunatly, my host does not allow me to access the server configuration files,
but does allow the use of the AuthConfig override.  The paths to the files used in this report,
will be changed to the absolute paths provided by my host, when I upload my site.  The "Docs"
folder is the document root and the AccessControlFile is set-up as ".htaccess".

The problem
In my .htaccess file, which is placed in the document root, I have been trying to get the
<Directory> directive to parse.  Here is what I have in my .htaccess file:

<Directory "C:/Apache Group/Apache/Scott/Docs/Secure">
    AuthType Basic
    AuthName "Realm"
    AuthUserFile "C:/Apache Group/Apache/Scott/Authentication/.htpasswd"
    AuthGroupFile /dev/nul
    AllowOverride AuthConfig FileInfo Limit
    Order Allow,Deny
    Allow from all
    Require valid-user
    Satisfy All

An example of what is in my .htpasswd file, is:


When I ran Apache and acceessed the page, it returned a "HTTP 500 Internal Server Error" error.
 I checked the log, and it read "[Wed Feb 27 15:18:41 2002] [alert] [client] c:/apache
group/apache/scott/docs/.htaccess: <Directory not allowed here"

I looked through the .htaccess file for any errors, but it was fine.  I checked the httpd.conf
file and AllowOverride statement in the <Directory> directive for the document root,

AllowOverride AuthConfig FileInfo Limit

I then tried the <Directory> directive from my .htaccess file in the httpd.conf file
and it worked.  I then refreshed the page and the directory listings appeared.  I then opened
the "Secure/" directory and was asked for the username/password.  I typed them in and was
granted access to that directory.

I am not sure what the problem was with parsing the <Directory> directive in my .htaccess
file.  As mentioned before, I need to specify the settings in the .htaccess file, as I can
not gain access to the httpd.conf file on my host's server.

I would appreciate any help you can give me with this problem.  If I can't put the <Directory>
directive in the .htaccess file, how else can I have password-protected directories?  I would
prefer having the information in the one file, which would make things easier, but if I have
to have them in seperate files, then that shouldn't be a problem.

I would appreciate your help.
Allow the <Directory> directive in the access control files.
 [In order for any reply to be added to the PR database, you need]
 [to include <apbugs@Apache.Org> in the Cc line and make sure the]
 [subject line starts with the report component and number, with ]
 [or without any 'Re:' prefixes (such as "general/1098:" or      ]
 ["Re: general/1098:").  If the subject doesn't match this       ]
 [pattern, your message will be misfiled and ignored.  The       ]
 ["apbugs" address is not added to the Cc line of messages from  ]
 [the database automatically because of the potential for mail   ]
 [loops.  If you do not include this Cc, your reply may be ig-   ]
 [nored unless you are responding to an explicit request from a  ]
 [developer.  Reply only with text; DO NOT SEND ATTACHMENTS!     ]

View raw message