I'm trying to setup Python3 and Python2 via mod_wsgi on Ubuntu, so I've installed the mod_wsgi_py3 package but also wish to run the py2 version and have it switched depending on a flag within the virtualhosts config. Is there any way to do this withing Apache 2.2?
Asked
Active
Viewed 516 times
1 Answers
2
No, it is not possible. you would need to run two Apache instances, each with different mod_wsgi binary compiled for the Python version you want to use.

Graham Dumpleton
- 6,090
- 2
- 21
- 19
-
That is disappointing. I was considering modifying the mod_wsgi binary for py2 to prefix all directives with PY2_ in order to have them both loaded side-by-side. I assume that will work but that's also not really road I'm ready to embark on. – Marco Ceppi Feb 13 '12 at 02:35
-
It is much deeper than just changing directive names. For a start you can't load the two different Python shared libraries for different Python versions into memory at the same time. – Graham Dumpleton Feb 13 '12 at 03:59