Score:0

set htpasswd to ask for credentials everytime

pe flag

Is it possible to configure your .htpasswd file so that it asks for your credentials every time? Right now it only asks initially but I want it so that it asks every time the browser is reloaded.

my .conf file:

<VirtualHost *:8081>
    ServerAdmin webmaster@localhost
    ServerName assignments
    DocumentRoot /var/www/assignments
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

 <Directory "/var/www/assignments">
      AuthType Basic
      AuthName "Hidden"
      AuthUserFile /etc/apache2/.htpasswd
      Require valid-user
  </Directory>
</VirtualHost>
pLumo avatar
in flag
What do you mean by "every time the browser is reloaded". It's not a setting on the webserver, but in the browser to cache the login. So the answer is no. What is the purpose?
Justin avatar
pe flag
by reload I mean every time you refresh the browser it would ask for your login info.. the purpose is just to see if its possible
Score:0
in flag

No.

Actually, the server will ask for the credentials for each request. However, the login is cached on the Browser. There is nothing you can do server-side.

On Firefox, you can clear Active Logins from "History -> Clear Recent History" Menu (Ctrl + Shift + Del).

See also.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.