mod_auth_pam and flatfile

The other day I found myself needing to restrict access to a web site to only users who had logins to a system … while also allowing other users, who didn’t have logins, to access.

mod_auth_pam was the solution for the users with a login … and standard ‘htpasswd’ access was the answer for the other users … but getting the two to work together was causing problems.

A bit of Googling turned up this technique that solves the problem quite nicely.

AuthPAM_Enabled on
AuthPAM_FallThrough on
AuthAuthoritative Off
AuthUserFile /path/to/htpassword
AuthType Basic
AuthName "Secure"
Require valid-user

[tags]apache, authentication, htaccess[/tags]

Related posts ...
If you're seeing a lot of messages about untrusted TLS connections in your mail log
We all agree that email is crucial to modern life. But what email should you
As part of my migration to the cloud, I terminated the Comcast Business internet service
With my recent migration of servers from my basement to Amazon cloud servers, I had

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.