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
- Can I host multiple sites with same django installation
- Also what bout apps which i have installed with pip like SOUTH, SENTRY, CMS, Celery etc. Do i need to install them again
- Will it interfere with cpanel/whm
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
Yes. This is possible in Django. This setup also enables the app to be multitenant. This configuration can be done with the apache config file. Also I remember one table django_site, which you can explore how to use.
For eg.,. if the domain is aaa.com use different aaa.py, and DB aaa. if the domain bbb.com, use different python file bbb.py and DB bbb
https://docs.djangoproject.com/en/dev/ref/contrib/sites/
http://thingsilearned.com/2009/01/05/using-subdomains-in-django/
精彩评论