Where do I place the WSGIPythonHome directive in the httpd.conf file?

I have searched the entire file for a place to put the directive, but I have no idea where to put it, and the internet doesn't seem to have a good answer either, or maybe I'm just not good at searching for it hehe.

Anybody know where this directive is to be placed?


Solution 1:

It should go outside of any VirtualHost directives. See:

http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGIPythonHome

Per definitions at:

http://httpd.apache.org/docs/2.2/mod/directive-dict.html#Context

and linked from context label for the entry, the value 'server config' means:

"""This means that the directive may be used in the server configuration files (e.g., httpd.conf), but not within any or containers. It is not allowed in .htaccess files at all."""

More importantly, do you really need to set it?

There are only certain times you would want to use WSGIPythonHome. Often people try and use it for the wrong reasons.