3

I'm confronted with an apache proxy setup which is already running in production. Sometimes there are requests for optimizations and I'm not very confident at apache configuration, so I keep asking myself everytime I change something: Did it really work?

I would like to have a way to temporarily enable some flag which shows me which directives had been active resulting in the final response.

For example I would like to know: Did the request hit the backend application and was thus deliviered from the backend or was it delivered through my new alias I recently added? Maybe I had a typo somewhere and I didnt recognize it. Did mod_cache handle the response? Did mod_rewrite change the request?

I was thinking about a debug request header which actives a few response headers such that I know which directives are active (and which not).

My approach would be to add SetEnvIf DEBUG someweirdkey HAVE_DEBUG in every vhost and then use Header set ALIAS "static image content" env=HAVE_DEBUG to see if the Location directive for an alias is used.

Is this a reasonable way to go? What are the alternatives? What do you use in your production environments to debug/understand what's going on?

  • Header set X-Debug-Alias "debug msg" env=HAVE_DEBUG is the only way I know for doing this – Antony Gibbs Mar 9 at 19:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.