httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Darren" <>
Subject .htaccess being ignored
Date Sat, 08 Dec 2001 21:22:45 GMT
I have thoroughly searched the FAQ's, docs, google and various articles
trying to figure out why my .htaccess file continues to be ignored.  From
what I can gather, the most common error seems to be 1) not having
AllowOverride set to All or AuthConfig 2)not having the path to the
.htaccess file included in one of the <Directory> containers 3) not having
AccessFileName set to .htaccess or 4)permissions incorrectly set.  But, I've
played with these for several hours and cannot seem to stumble on the
correct combination of settings.

I am using apache-1.3.22_4 on FreeBSD 4.4-RELEASE.  And, here is what I have

First of all, I created my password file with htpasswd -c
/usr/local/etc/apache/users.  I verified that the file contained the user
name and encrypted password.  My DocumentRoot is set to
"/usr/local/www/htdocs/".  So, I created a subdirectory called private in
/usr/local/www/htdocs/.  Then, I created my .htaccess file and put it in
that directory (/usr/local/www/htdocs/private/.htaccess).  The .htaccess
file contains the following:

AuthName "private matters"
AuthType Basic
AuthUserFile /usr/local/etc/apache/users
AllowOveride AuthConfig
# Satisfy All
<limit POST>
require valid-user

The parts of httpd.conf that I think are relevant for anyone helping me
troubleshoot are:

<Directory "/usr/local/www/htdocs/private">
        AllowOverride none
AccessFileName .htaccess

Note that I do restart apache with "httpd restart" between httpd.conf edits.
I have played with the permissions.  They are currently set to:

fbsd# ls -ltr /usr/local/www/htdocs/private/.htaccess httpd.conf users
-rw-r-----  1 nobody  nogroup    22 Dec  6 22:13 users
-rw-r--r--  1 nobody  nogroup   168 Dec  8 12:34
-rw-------  1 nobody  nogroup  7843 Dec  8 13:07 httpd.conf

The only thing that I may not have completely or adequately addressed is the
permission thing.  Even though I have:

User nobody
Group nogroup

set in httpd.conf, a quick check of the /etc/group file didn't have any
references to apache.  So, I edited it.  But, I wasn't sure exactly how to
reference apache properly.  So, I took the shotgun approach.  The relevant
part of /etc/group looks lik this:


I didn't want to reboot.   But, I wasn't too sure how make sure that edits
to my /etc/group file had been recognized.  So, I restarted apache again (I
figured that was like logging out and back in).  So, I'm thinking that
although apache is asking to be recognized as user nobody and part of
nogroup, it is possible that the kernel isn't allowing it.  Pardon my
ignorance on this.

I really can't think of any else to try.  I would appreciate it if anyone
could either point me to the documentation that I have obviously been
overlooking, or making some other suggestions.



PS    It might be worthwhile to note that I have edited the appropriate
files many many times.  The references that I am making to them in this
email are with respect to how they are currently set.

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message