[mod_python] Dear all, about virtual host security

Jim Gallacher jpg at jgassociates.ca
Thu Aug 3 08:25:41 EDT 2006

IQDoctor wrote:
> Dear all,
> How to secure use mod_python in different virtual host?
> without suexec and perchild mpm

In short, you can't.

Mod_python simply embeds a python interpreter, so your code can do
whatever a command line interpreter could do if it was run with the same
privileges as the Apache user. Since python does not provide any kind of
restricted environment, neither does mod_python.

For this reason I don't personally feel mod_python is suitable for mass
virtual host environments. If you can't trust or control the code being
used in the virtual hosts then mod_python may not be suitable for you.


More information about the Mod_python mailing list