views:

38

answers:

1

I have my Apache web server fronting a Rails application. When a request comes in one of the Apache modules looks at the request and puts information into an Apache environment variable. My question is, is there a chance that one request can overwrite the environment variable of another request and have things get mixed up in the Rails layer?

Are Apache Environment Variables shared across Apache processes?

+1  A: 

It sounds like you're using mod_setenvif, in which case, according to Environment Variables in Apache:

For additional flexibility, the directives provided by mod_setenvif allow environment variables to be set on a per-request basis, conditional on characteristics of particular requests.

It makes no sense to me that variables set in one request could affect another request. Race conditions would be rampant and nothing would work.

Steve Madsen