I would like to add multisite support in my dev site. Haven’t found much help on the web. Can anybody point to a resource where I can get some guidance?

Basically I would like to create pages for different sites, and then let the platform point to one or another based on that, however I created a site2 in my test deployment and created a page1 for site2, however that doesn’t seem to work. Whenever I point to domain2, I get all the pages from domain1 aswell.

Thanks in advance for your help.


for the multisite to actually work, you need to split the django config into two or more parts having different SITE_ID, and then run the servers on different ports for connecting to different domains, or to do something similar.

In order not to duplicate the entire setting file, you may rename to,
and create and looking like this:

from cms.commonsettings import *


Then run it using commands runserver 6001 --settings=cms.settings_1 runserver 6002 --settings=cms.settings_2

And connect to different domains in nginx.

Of cause, for production environment wsgi interface is needed, but the general idea remains.
Hope it helps.



And since the wsgi files point to the settings, you have to adopt them like so:

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cms.settings_1")