(apache) how to put username & passwd on dir.
![](https://seccdn.libravatar.org/avatar/8b29c64096429656d603f22ed24fe149.jpg?s=120&d=mm&r=g)
Hi: Ive already created a .htaccess file with htpasswd... but still cant get apache to ask me for user and passwd when I open the directory where I created the .htaccess file from a web browser.... what am I missing?? Thanks, Raul
![](https://seccdn.libravatar.org/avatar/eb1510db24d3dab862c2162c3264ee54.jpg?s=120&d=mm&r=g)
Raúl Gutiérrez Segalés wrote:
Hi:
Ive already created a .htaccess file with htpasswd... but still cant get apache to ask me for user and passwd when I open the directory where I created the .htaccess file from a web browser.... what am I missing??
Hi, your .htaccess file should look something like 1. AuthUserFile /etc/httpd/passwd AuthGroupFile /dev/null AuthType Basic AuthName Restricted <Limit GET POST> require user zentara require user test </Limit> 2. Then your /etc/httpd/passwd file should have the users listed with their passwords. 3. Then in your /etc/httpd/httpd.conf file you have to set the AllowOverRide for each directory you want to use it in. It is easiest to set it to AllowOverride All The reason it's a problem, is that if you read the httpd.conf , suse first sets a very restricted environment, where the set AllowOverride None for everything. Then you must manually override it for all directories. -- $|=1;while(1){print pack("h*",'75861647f302d4560275f6272797f3');sleep(1); for(1..16){for(8,32,8,7){print chr($_);}select(undef,undef,undef,.05);}}
![](https://seccdn.libravatar.org/avatar/4061da98a36ba319796cce5e430bc439.jpg?s=120&d=mm&r=g)
Symptom The password protection via .htaccess doesn't work anymore after an update to SuSE Linux 7.2. An eventually in /etc/httpd/httpd.conf defined password protection doesn't work anymore also. Cause The apache module mod_auth_nds. Solution Exchange the value yes to no in the line HTTPD_SEC_MOD_AUTH_NDS=yes of the file /etc/rc.config.d/apache.rc.config. Execute as user 'root' SuSEconfig --module apache in a text terminal to active the changes. Afterwards the apache has to be restarted (rcapache restart). Hint: General considerations about 'Webserver Directories with Password Protection' can be found at http://portal.suse.de/en/content.php?SEARCH&content/security/htpasswd.html. On Wednesday 02 January 2002 10:44 am, you wrote:
Hi:
Ive already created a .htaccess file with htpasswd... but still cant get apache to ask me for user and passwd when I open the directory where I created the .htaccess file from a web browser.... what am I missing??
Thanks,
Raul
participants (3)
-
phil
-
Raúl Gutiérrez Segalés
-
zentara