Frage

I am building a web application in django 1.4 which I have to deploy on apache using mod_wsgi. The problem is that there is already a raw python web application running on it using mod_python. On studying through internet, I found that its possible to use both applications. My question is what combination of versions(of course more recent versions are more prefered) of python, mod_python, mod_wsgi, apache and django are compatible?

Thanks in advance

War es hilfreich?

Lösung

Believe it or not, I have the exact same setup.

The simplest way to handle it is to partition the applications under VirtualHosts. If you can do this, then it's all super easy. You just have a VirtualHost entry for each application.

If you need to run them under HTTP/S, then you may run into problems. Apache can only have one VirtualHost for all HTTP/S sites on the same server.

We are running the following versions on our main production machine:

  • Apache/2.2.14 (Ubuntu)
  • mod_python/3.3.1
  • Python/2.6.5
  • mod_ssl/2.2.14
  • OpenSSL/0.9.8k
  • mod_wsgi/2.8

Andere Tipps

Django runs best and is recommended to run in production using mod_wsgi IF you are using apache. uwsgi is better if you are using nginx ( I find nginx far better than apache personally )

You can run it whatever way you want but that's the best way.

You can run mod_python fcgi or cgi processes at the same time as other mod_wsgi apps and use apache as a reverse proxy ( or sit nginx in front of apache as a reverse proxy ). You can diver traffic to the relevant apps this way.

There is no preferred version of mod_python. It's deprecated. Don't use it.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top