I've got a server running several vhost sites, and was wondering if there could be a way to get some vhost PHPs executed under a different user/group depending on the client connecting to them. I figured it could go like:
- client connects via https
- client may present SSL certificate (or not)
- server decides whether to:
- if no certificate was given, run PHP under user1/group1
- if a certain whitelisted certificate, and certain cookie are sent by the client, run PHP under user2/group2
Does anybody know if something like this would be possible?