Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'd like to configure Apache to serve files directly from the file system but authenticate/authorize users. How can Apache be configured so it calls my auth middleware?

Basically:

1) Redirect to login if user is not authenticated. Check session cookie against database otherwise.

2) Allow access to certain files based on who the user is (authorization).

share|improve this question
    
Any more details? What authentication does your current system use? –  sam Jun 22 '11 at 19:01
add comment

1 Answer

Try a Google search for "apache single signon" or "apache sso". In particular, look at:

All of these implement almost exactly the mechanism you've described.

share|improve this answer
add comment

Your Answer

 
discard

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.