Monday, June 21, 2010

HOW TO? multiple sites, one virtual host, routing settings.py?

I'll soon be deploying a project that will need to be able to
dynamically add domains.

Each domain will have different users, separate data, and a different
SITE_ID, but will all run off a single Django instance. The data will
all be housed in a single database, since all domains' data will need
to be accessible together via a global admin panel.

I'm thinking that the simplest way to accomplish this on the hosting
level would be a wildcard VirtualHost, and a separate settings.py for
each site that simply specifies the SITE_ID and pulls in the global
settings.

Is there an easy way to route each domain to a separate settings file
using a single virtual host?

(I'm open to different server models -- leaning towards mod_wsgi but
happy to use FCGI or mod_python if they'll make this more
straightforward.)

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment