Hi, I'm having a problem with a web server that I have just switched over from using SuSE 6.4 to 7.2. The machine was wiped and re-installed with SuSE 7.2 from scratch. Everything is working fine apart from one thing. I'm trying to password protect a directory on the web site. I've changed httpd.conf to allow .htaccess overrides (AllowOverride All). I've put the following .htaccess file in the directory I want to protect: Deny from all AuthType Basic AuthUserFile /usr/local/httpd/passwords/adminpass AuthName "Admin Tools" Require valid-user Satisfy any I've also used htpasswd to create the 'adminpass' file in the correct directory. All the file permissions have been checked and are correct. Everything worked fine with these settings under SuSE 6.4 (Apache 1.3.12). Using SuSE 7.2 (Apache 1.3.19) the password request box appears as it should, but access is always denied when entering the correct username and password. Does anybody know what the problem could be? Thanks, David Powell.
There is no point in having: "Deny from all" and "Satisfy any" without an "Allow from ???? directive too - you might as well just have: AuthType Basic AuthUserFile /usr/local/httpd/passwords/adminpass AuthName "Admin Tools" Require valid-user But, I suspect your problem is permissions - check that the account the httpd daemon runs under has read access to '/usr/local/httpd/passwords/adminpass' by su-ing to that account and cat-ing the file. -- Simon Oliver
At 11:12 AM 30/08/01, Simon Oliver wrote:
There is no point in having:
"Deny from all" and "Satisfy any" without an "Allow from ???? directive too - you might as well just have:
AuthType Basic AuthUserFile /usr/local/httpd/passwords/adminpass AuthName "Admin Tools" Require valid-user
OK. I've changed the .htaccess file to what you suggest.
But, I suspect your problem is permissions - check that the account the httpd daemon runs under has read access to '/usr/local/httpd/passwords/adminpass' by su-ing to that account and cat-ing the file.
I've tried su-ing to 'wwwrun' (I also tried su-ing to 'nobody' and a few others just to be sure) and cat-ing the file, which worked fine. The thing that puzzles me is that everything works OK with the same settings under SuSE 6.4 (Apache 1.3.12), but it doesn't work under SuSE 7.2 (Apache 1.3.19). Thanks for the suggestions, David Powell.
On Thursday 30 August 2001 1:14 pm, David Powell wrote:
At 11:12 AM 30/08/01, Simon Oliver wrote:
There is no point in having:
"Deny from all" and "Satisfy any" without an "Allow from ???? directive too - you might as well just have:
AuthType Basic AuthUserFile /usr/local/httpd/passwords/adminpass AuthName "Admin Tools" Require valid-user
OK. I've changed the .htaccess file to what you suggest.
But, I suspect your problem is permissions - check that the account the httpd daemon runs under has read access to '/usr/local/httpd/passwords/adminpass' by su-ing to that account and cat-ing the file.
I've tried su-ing to 'wwwrun' (I also tried su-ing to 'nobody' and a few others just to be sure) and cat-ing the file, which worked fine.
The thing that puzzles me is that everything works OK with the same settings under SuSE 6.4 (Apache 1.3.12), but it doesn't work under SuSE 7.2 (Apache 1.3.19).
Did you copy across your old httpd.conf or modify the one supplied? Maybe a change between versions? M
At 10:02 PM 30/08/01, Martin Webster wrote:
Did you copy across your old httpd.conf or modify the one supplied? Maybe a change between versions?
I modified the one supplied. I have tried copying across the httpd.conf from SuSE 6.4 and using it with SuSE 7.2. (I'm using the defaults in both cases except for changing AllowOverride to All) Trying to use the 6.4 httpd.conf with 7.2 caused the httpd daemon not to run at all. (or at least I got no response on port 80 from my client machine) David.
Did you see this - looks like it might fix your problem: Martin Wrote:
SuSE 7.2 has a bug that disables the use of 'AuthType basic' and 'AuthUserFile' in a .htaccess file. Possible this bug is also active if you use /etc/httpd/httpd.conf and not .htaccess.
Put a comment (#) in front of the line with 'mod_auth_nds.c' in the file /etc/httpd/suse_addmodule.conf and restart apache. This worked for me.
Daniel Woodard capped with: This worked for me also! Go Cees! This fix is spot-on. I did try some more last week to no avail. I edited out "mod_auth_nds.c" httpd.conf and restarted apache, rewrote .htaccess and .htpasswd and poof! It works for the first time! This is a bug or a conflict or oversight or something! Thanks Cees and Martin!
At 09:36 AM 31/08/01, Simon Oliver wrote:
Did you see this - looks like it might fix your problem:
Put a comment (#) in front of the line with 'mod_auth_nds.c' in the file /etc/httpd/suse_addmodule.conf and restart apache. This worked for me.
I must have missed that post. Thanks, that fixed the problem. :-) David.
participants (3)
-
David Powell
-
Martin Webster
-
Simon Oliver