Syntax:
PythonInterpPerDirectory {On, Off}
Default:
PythonInterpPerDirectory Off
Context:
server config, virtual host, directory, htaccess
Override:
not None
Module:
mod_python.c
Instructs mod_python to name subinterpreters using the directory of
the file in the request (req.filename
) rather than the the
server name. This means that scripts in different directories will
execute in different subinterpreters as opposed to the default policy
where scripts in the same virtual server execute in the same
subinterpreter, even if they are in different directories.
For example, assume there is a /directory/subdirectory. /directory has an .htaccess file with a PythonHandler directive. /directory/subdirectory doesn't have an .htaccess. By default, scripts in /directory and /directory/subdirectory would execute in the same interpreter assuming both directories are accessed via the same virtual server. With PythonInterpPerDirectory, there would be two different interpreters, one for each directory.