Is there any way to get Apache to run a command/program every time a web page is requested? I know I could scan the logs for new entries every minute or so, but can I get Apache to directly call the command? There might be an option like this in one of the configuration files, but if there is I don't know what it is. My server is running Ubuntu 9.04.
+2
A:
You can use the CustomLog directive to pipe the access log to a script or program, which could be useful in your situation. All you would have to do is set up a while loop (or similar structure) on STDIN in the language of your choice and then execute your command from there.
Kendrick Erickson
2009-05-20 14:48:17