Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The following dilemma exists... One virtual hosts, three directories with three different handlers let's say Mason, PHP, Ruby. (Mason) (PHP) (Ruby)

Now when I request whatever from Dir2 or Dir3 I'd like apache2 to execute a script from Dir1 first followed by the original request. Is it possible to do it with some magic configuration option?

share|improve this question

To me it seems like the only way to do smth like this is writing input handler, that is a program that Apache can use at various stages of processing HTTP request. More here:

share|improve this answer
Thanks! This is a good starting point to my investigation. – tkane Jan 26 '11 at 11:00

Your Answer


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.