Apache2.conf <Directory> Restricted file - User/Password Dialog Box returns showing last entry already filled out
by pizzipie from LinuxQuestions.org on (#5H182)
I am experimenting with apache2.conf as per apache2Cookbook.pdf. The problem I have is that after I invoke firefox localhost/restricted.html the second, third, etc ... times the restricted.html code runs as if you had just entered the user/passwd fields in the Dialog Box all over again. Why doesn't the user/passwd Dialog Box ask for these fields again each time?? Maybe it is acting properly ???
Thanks R.
Code:restricted.html
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Restricted file</title>
</head>
<body>
<h1>Restricted File</h1>
<h2> Testing by Rick </h2>
<img src="https://files.softicons.com/download/folder-icons/dellios-system-icons-by-dellustrations/png/128/restricted.png" />
</body>
</html>
==================================================
first lines I added to apache2.conf
#Added this as experiment 24Apr2021
<Directory /var/www/html>
<Files restricted.html>
AuthType Basic
AuthName "SystemCodeGeeks - Restricted file"
AuthBasicProvider file
#AuthUserFile /etc/apache2/passwds >>>>>> original in .conf file ..... test pwd below in line 11
AuthUserFile /home/rick/secure/apachepwds
Require user rick
</Files>
</Directory>
# This is the main Apache server configuration file. It contains the ......


Thanks R.
Code:restricted.html
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Restricted file</title>
</head>
<body>
<h1>Restricted File</h1>
<h2> Testing by Rick </h2>
<img src="https://files.softicons.com/download/folder-icons/dellios-system-icons-by-dellustrations/png/128/restricted.png" />
</body>
</html>
==================================================
first lines I added to apache2.conf
#Added this as experiment 24Apr2021
<Directory /var/www/html>
<Files restricted.html>
AuthType Basic
AuthName "SystemCodeGeeks - Restricted file"
AuthBasicProvider file
#AuthUserFile /etc/apache2/passwds >>>>>> original in .conf file ..... test pwd below in line 11
AuthUserFile /home/rick/secure/apachepwds
Require user rick
</Files>
</Directory>
# This is the main Apache server configuration file. It contains the ......