Apache Server configuration support - mod_auth -- what am I missing?

This is Interesting: Free IT Magazines  
Home > Archive > Apache Server configuration support > October 2005 > mod_auth -- what am I missing?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author mod_auth -- what am I missing?
Stan Brown

2005-10-24, 4:44 pm

I was on an Apache 1.3 server and my hosting company has moved me to
a 2.0.46 server. I'm trying to password-protect the contents of one
directory. It was working in 1.3 but I can't get it to work in 2.0.
Both Mozilla and lynx say authorization failed.

I've consulted the docs
<http://httpd.apache.org/docs/2.0/howto/auth.html> but I can't find
my mistake.

Here is my _entire_ .htaccess file in that directory*)
AuthUserFile ./.htpasswd
AuthName Bookmarks
AuthType Basic
require user XXX

where the actual user name has been replaced by XXX. Yes, I checked
that the user name is in the password file, and I re-ran htpasswd
just to be sure the password is what I think it is.


(*)I know the .htpasswd file shouldn't be reachable as a URI, but I
made this a minimal case till I get it working.

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
"You find yourself amusing, Blackadder."
"I try not to fly in the face of public opinion."
Punkt

2005-10-24, 4:44 pm

Hi Stan,

I think I read that a passwd file cannot be located in the directory it has
to protect. (does my english make any sense to native speakers?!?! sorry.)

First move your passwd file somewhere else, but out of the directory
containing the htaccess it refers to.
If that doesn't work use absolute path names (AuthUserFile).

hope it helps
Punkt

"Stan Brown" <the_stan_brown@fastmail.fm> schrieb im Newsbeitrag
news:MPG.1db6eec8e82a02999899a2@news.individual.net...
> I was on an Apache 1.3 server and my hosting company has moved me to
> a 2.0.46 server. I'm trying to password-protect the contents of one
> directory. It was working in 1.3 but I can't get it to work in 2.0.
> Both Mozilla and lynx say authorization failed.
>
> I've consulted the docs
> <http://httpd.apache.org/docs/2.0/howto/auth.html> but I can't find
> my mistake.
>
> Here is my _entire_ .htaccess file in that directory*)
> AuthUserFile ./.htpasswd
> AuthName Bookmarks
> AuthType Basic
> require user XXX
>
> where the actual user name has been replaced by XXX. Yes, I checked
> that the user name is in the password file, and I re-ran htpasswd
> just to be sure the password is what I think it is.
>
>
> (*)I know the .htpasswd file shouldn't be reachable as a URI, but I
> made this a minimal case till I get it working.
>
> --
> Stan Brown, Oak Road Systems, Tompkins County, New York, USA
> http://OakRoadSystems.com/
> "You find yourself amusing, Blackadder."
> "I try not to fly in the face of public opinion."



Stan Brown

2005-10-24, 4:44 pm

On Wed, 12 Oct 2005 17:19:55 +0200 in alt.apache.configuration, Punkt
favored us with...
> I think I read that a passwd file cannot be located in the directory it has
> to protect. (does my english make any sense to native speakers?!?! sorry.)
>
> First move your passwd file somewhere else, but out of the directory
> containing the htaccess it refers to.
> If that doesn't work use absolute path names (AuthUserFile).


Thanks for posting, but that's what I started with. I did have
absolute path and the .htpassword file was in another directory. I
moved it to the same directory to simplify the example.

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
"You find yourself amusing, Blackadder."
"I try not to fly in the face of public opinion."
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2009 webservertalk.com