Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've enabled htpasswd on a webpage. Is there a way I can limit the number of attempts a user has to enter the correct username/pass credentials before they have to do a hard refresh of the page?

share|improve this question
up vote 4 down vote accepted

Not with basic authentication, you'll need to go to a different authentication module in order to do it. I was just reading up on mod_auth_pamacea which allows you to use the PAM libraries and all of their goodness with .htpasswd. You could setup a separate service for your http authentication and then use to limit the number of login attempts. Here are a couple of links for your reading pleasure:

The Linux-PAM System Administrators' Guide

mod_auth_pamacea Documentation

I'm sure there are other auth modules that will allow the same functionality, to me this is the closest you'll come to mod_auth_basic.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.