two django sites at different revisions with apache

34 views
Skip to first unread message

Mike Dewhirst

unread,
Feb 3, 2015, 2:44:51 AM2/3/15
to django...@googlegroups.com
Is it possible to run two virtual hosts on the same machine for Django
sites where one is 1.7 and the other 1.6?

Thanks

Mike

James Schneider

unread,
Feb 3, 2015, 3:00:58 AM2/3/15
to django...@googlegroups.com
I don't see why not. For Apache, you would just place the relevant WSGIScriptAlias and WSGIPythonPath inside of your VirtualHost elements. You would need to be cautious about running a single WSGI process though, since the first site settings read will apply to all of your Django sites (which is probably not what you want), as explained at the end of the section in the Django docs here:


Django recommends running Apache WSGI in daemon mode though, so you shouldn't need to worry about the settings files clashing: https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/modwsgi/#daemon-mode

Haven't toyed enough with the others to know whether or not it is possible, but I'm sure all of the major servers have similar separation strategies for exactly this scenario.

A quick Google shows that Nginx/uWSGI can support multiple sites through the use of Emperor Mode and separate vassal configuration for each site, which sounds very similar to Apache/mod_wsgi daemon mode.

-James




Mike

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/54D07C57.4010108%40dewhirst.com.au.
For more options, visit https://groups.google.com/d/optout.

Mike Dewhirst

unread,
Feb 3, 2015, 6:27:47 PM2/3/15
to django...@googlegroups.com
Thanks James. I'll work through it.

Cheers

Mike
> send an email to django-users+unsubscribe@__googlegroups.com
> <mailto:django-users%2Bunsu...@googlegroups.com>.
> To post to this group, send email to django...@googlegroups.com
> <mailto:django...@googlegroups.com>.
> Visit this group at http://groups.google.com/__group/django-users
> <http://groups.google.com/group/django-users>.
> To view this discussion on the web visit
> https://groups.google.com/d/__msgid/django-users/54D07C57.__4010108%40dewhirst.com.au
> <https://groups.google.com/d/msgid/django-users/54D07C57.4010108%40dewhirst.com.au>.
> For more options, visit https://groups.google.com/d/__optout
> <https://groups.google.com/d/optout>.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to django-users...@googlegroups.com
> <mailto:django-users...@googlegroups.com>.
> To post to this group, send email to django...@googlegroups.com
> <mailto:django...@googlegroups.com>.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CA%2Be%2BciVBLqhUt5f7xiFxnnRJ%3DAV%3DzPQdCD9oK2dQcUKP_RhdKw%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CA%2Be%2BciVBLqhUt5f7xiFxnnRJ%3DAV%3DzPQdCD9oK2dQcUKP_RhdKw%40mail.gmail.com?utm_medium=email&utm_source=footer>.
Reply all
Reply to author
Forward
0 new messages