Score:2

Setting up password only authentication in apache

cn flag

I have a folder on my website using apache basic authentication. The Auth is controlled by a .htaccess file which has been placed into the directory that should be protected.

This is the content of the .htaccess file:

AuthType Basic
AuthName "Please enter your credentials to continue."
AuthUserFile /my/path/here/.htpasswd
Require valid-user

However, I do not want to give every person that is using the protected directory their own credentials, I would like them all to share a single secret.

Is it possible to stop apache from asking for a user name and a password and instead only asking for a password, using only a .htaccess file?

Score:2
ar flag

No, that's not possible using Basic Authentication. It's not Apache that asks for username and password; it's the browser.

Apache only sends a generic header:

WWW-Authenticate: Basic realm="User Visible Realm"

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.