Skip to content
Advertisement

Can i host multiple sites with one django installation

I have my own VPS server with Centos and cpanel/WHM

Currently i am building one website in Django with djnago builin server. When site finishes then i will move to WSGI and apache

I want to know that

  1. Can I host multiple sites with same django installation
  2. Also what bout apps which i have installed with pip like SOUTH, SENTRY, CMS, Celery etc. Do i need to install them again
  3. Will it interfere with cpanel/whm

Advertisement

Answer

Yes.

On the Apache side, you will want to look into virtual hosts. You provide a different configuration for each site, based on the hostname, and Apache routes the incoming requests accordingly. See http://httpd.apache.org/docs/2.2/vhosts/

As for Python packages, including South, Celery, and Django itself, you can certainly share them between all your sites. That’s what happens by default. However, the Right Way to do things would be to use a different virtualenv for each site. That way you can, for example, upgrade the version of Django one site runs on but not the other. See http://pypi.python.org/pypi/virtualenv

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement