Technically it should be able to made to work. I would recommend though you 
use mod_wsgi daemon mode and delegate each Django site instance to its own 
process, rather than each sharing the same process but in different sub 
interpreters. See:

  
http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide#Delegation_To_Daemon_Process

This will ensure that leakage of environment variables or other process 
level settings across sub interpreters doesn't occur.

Graham

On Thursday, January 20, 2011 11:20:36 AM UTC+11, Osiaq wrote:
>
> Hi all! 
> I have 2 separate projects, with 2 separate domains 
>
> The problem: first website, ELG, is working OK. 
> Another, cc4h, cannot find template index.html, but is working perfect 
> on localhost with Django development server. 
>
> Do you know any good tutorial regarding multiple domains on single 
> Apache? 
> It doesnt seems as easy as I thought it will be. 
>
> Thank you 
>
> Code: 
>
> Both WSGI files (projects ELG and CC4H): 
> --------------------------------- 
>  /home/django/projects/elg/apache/elg.wsgi 
>  /home/django/projects/cc4h/apache/cc4h.wsgi 
> --------------------------------- 
> import os, sys 
> sys.path.append('/home/django/projects') 
> os.environ['DJANGO_SETTINGS_MODULE'] = 'elg.settings' #for project 
> cc4h is 'cc4h.settings' 
> import django.core.handlers.wsgi 
> application = django.core.handlers.wsgi.WSGIHandler() 
>
> -------------------------------- 
> My httpd.conf: 
> -------------------------------- 
> NameVirtualHost * 
> <VirtualHost *> 
> ServerName www.domain1.com 
> ServerAdmin ***l...@gmail.com 
> Alias /robots.txt /home/django/projects/elg/media/robots.txt 
> Alias /favicon.ico /home/django/projects/elg/media/favicon.ico 
> AliasMatch ^/([^/]*\.css) /home/django/projects/elg/media/css/$1 
> AliasMatch ^/([^/]*\.js) /home/django/projects/elg/media/js/$1 
> Alias /media/ /home/django/projects/elg/media/ 
> <Directory /home/django/projects/elg/media> 
> Order deny,allow 
> Allow from all 
> </Directory> 
> WSGIScriptAlias / /home/django/projects/elg/apache/elg.wsgi 
> <Directory /home/django/projects/elg/website> 
> Order allow,deny 
> Allow from all 
> </Directory> 
> </VirtualHost> 
>
>
> <VirtualHost *> 
> ServerName www.domain2.com 
> ServerAdmin ***l...@gmail.com 
> Alias /robots.txt /home/django/projects/cc4h/media/robots.txt 
> Alias /favicon.ico /home/django/projects/cc4h/media/favicon.ico 
> AliasMatch ^/([^/]*\.css) /home/django/projects/cc4h/media/css/$1 
> AliasMatch ^/([^/]*\.js) /home/django/projects/cc4h/media/js/$1 
> Alias /media/ /home/django/projects/cc4h/media/ 
> <Directory /home/django/projects/cc4h/media> 
> Order deny,allow 
> Allow from all 
> </Directory> 
> WSGIScriptAlias / /home/django/projects/cc4h/apache/cc4h.wsgi 
> <Directory /home/django/projects/cc4h/website> 
> Order allow,deny 
> Allow from all 
> </Directory> 
> </VirtualHost> 
>
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to