httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doug Groves" <gro...@valis.net>
Subject RE: htaccess files
Date Tue, 09 Jul 2002 16:57:06 GMT
Thanks for taking the time...here's what I have set up now....

Overview:
FreeBSD 4.1  Apache+SSL 1.3.26 - P3 450 with 128 megs ram.

I am restarting Apache each time I make a change, even to the
.htaccess files.

I am editing the correct httpd.conf and there is only one instance
of Apache accessing this directory.

Here are what I assume/remember to be the pertinent parts from the
httpd.conf file..

------
   <Directory>
     AllowOverride AuthConfig
   </Directory>
.
.
.
DocumentRoot "/usr/local/www/data"
.
.
.
   AccessFileName .htaccess
.
.
.
   <Directory "/usr/local/www/cgi-bin/testcgi">
     deny from all
     AllowOverride AuthConfig
     Order deny, allow
   </Directory>
------

Here is the contents of /usr/local/www/cgi-bin/testcgi/.htaccess

   AuthType Basic
   AuthUserFile /usr/local/etc/apache/master.passwd
   AuthName TestCGI
   require valid-user

I also chown'd the file to nobody (chgrp nobody as well) and chmod'd
it to 600.

Oddly enough, when I try to access it now, I get the Forbidden error
as opposed to it just executing.  I've tried putting all the .htaccess
directives in the Directory container as well (so it looks like this...

   <Directory "/usr/local/www/cgi-bin/testcgi">
     deny from all
     AllowOverride AuthConfig
     Order deny, allow
     AuthType Basic
     AuthUserFile /usr/local/etc/apache/master.passwd
     AuthName TestCGI
     require valid-user
   </Directory>

With the same Forbidden error.  It does seem I'm getting closer...

Again, thanks for taking the time to look at this...
Doug


-----Original Message-----
From: Boyle Owen [mailto:Owen.Boyle@swx.com]
Sent: Tuesday, July 09, 2002 11:02 AM
To: users@httpd.apache.org
Subject: RE: htaccess files

Have faith - this mechanism is working perfectly in millions of webservers
world-wide. You must have some simple flaw somewhere which is blocking
you...

Let's get right back to the basics:

- you are restarting apache after each config change, aren't you? (I say
this because there were definately errors in your original posting and if
you've fixed them, it should work now)
- you are editing the correct httpd.conf?
- you only have one instance of apache serving this directory?

Please post the following for checking:
- the directory path in your <Directory> container.
- the path containing the .htaccess (cd to the directory then do "pwd")
- the path to your password file
- do "ls -al" on the same path to prove it works
- post your directory container again
- post your .htaccess file again

If you want to check something - put all the .htaccess directives into the
directory container in httpd.conf and forget about .htaccess - does that
make it work? (Remember, you are combining two mechinisms here:
authentication and .htaccess...)

You must be really close!

Rgds,

Owen Boyle.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message