1

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).

pq01
  • 111
  • 2
  • Any more details? What authentication does your current system use? –  Jun 22 '11 at 19:01

1 Answers1

5

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.

larsks
  • 43,623
  • 14
  • 121
  • 180