Hi Graham,
Thanks for your quick response. We're just trying to share
configuration variables across multiple projects/coding languages and
environment variables are a convenient way to do that. Sounds like
adding variables to os.environ is the best option.
Is it technically feasible for mod_wsgi to source the daemon process
user's environment on startup? Why wouldn't that behavior be
desirable?
Andres
On Nov 10, 11:44 pm, Graham Dumpleton <[email protected]>
wrote:
> On 11 November 2011 15:03, andres <[email protected]> wrote:
>
> > Hi All,
>
> > Is there a way to source a user's environment on startup? I'm running
> > mod_wsgi in daemon mode and I'd like to access the user's environment
> > variables from within the process.
>
> No.
>
> You inherit the user environment of root effectively and would not be
> wise to be sourcing a users environment when starting Apache as root.
>
> What user environment variables do you need to have?
>
> One would try and avoid relying on environment variables in web applications.
>
> If absolutely necessary, one can set them from the WSGI script file
> explicitly by updating os.environ.
>
> Graham

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en.

Reply via email to