Tryng to run 2 Python applications with different Python versions with mod_wsgi
<p>I have in my Apache 2 applications: Django app and MoinMoin app. The first one is running now with Python3.4 and the second one (MoinMoin) with Python2.7</p>

<p>When running dpkg:</p>

<pre><code>ruben@babylon:/var/log/apache2$ dpkg -l | grep wsgi
rc  libapache2-mod-wsgi                   3.4-4ubuntu2.1.14.04.2                amd64        Python WSGI adapter module for Apache
ii  libapache2-mod-wsgi-py3               3.4-4ubuntu2.1.14.04.2                amd64        Python 3 WSGI adapter module for Apache
</code></pre>

<p>but Apache can't run the 2 modules at the same time. Django (Python3) is working but MoinMoin (Python2.7) not. How can I fix that?</p>

<p>Thanks.</p>

<p>As you were told already in:</p>

<ul>
<li><a href="http://stackoverflow.com/questions/40043543/virtual-environment-not-recognized-in-wsgipythonpath">Virtual environment not recognized in WSGIPythonPath</a></li>
</ul>

<p>you cannot do that within a single Apache instance.</p>

<p>The simple answer as was described is to run a separate WSGI server such as <code>mod_wsgi-express</code>, or you can use <code>gunicorn</code> our something else as well, and set it up behind the main Apache instance it with Apache proxying to it.</p>

<p>There are a lot of details around doing this and as also suggested, you are better off asking on the mod_wsgi mailing list if you want to do this with mod_wsgi.</p>

<p>If don't wish to use the mod_wsgi mailing list, then you can find some information in:</p>

<ul>
<li><a href="http://blog.dscpl.com.au/2015/06/proxying-to-python-web-application.html" rel="nofollow">http://blog.dscpl.com.au/2015/06/proxying-to-python-web-application.html</a></li>
<li><a href="http://blog.dscpl.com.au/2015/07/redirection-problems-when-proxying-to.html" rel="nofollow">http://blog.dscpl.com.au/2015/07/redirection-problems-when-proxying-to.html</a></li>
</ul>

<p>It talks about proxying to backend WSGI application running in Docker, but all the same principles apply as to setting up the proxy fronted and the issues that arise.</p>

python django apache mod-wsgi moinmoin