Hi Tom Evans,

Was exactly the ServerName.
Thank you.

:)

On 24 Out, 15:14, Tom Evans <tevans...@googlemail.com> wrote:
> On Fri, Oct 21, 2011 at 10:57 AM, Didex <dilvanezanard...@gmail.com> wrote:
> > Hello everyone,
>
> > I am trying setup a webserver(Centos) with two django sites, but i am
> > havecacheproblems.
>
> > http.config:
>
> > NameVirtualHost *:80
> > WSGIPythonEggs /usr/local/django/eggs
> > WSGIPythonPath /usr/local/django:/usr/local/django/site1:/usr/local/
> > django/site2
>
> > site1.config:
>
> > <VirtualHost*:80>
> >        ServerAdmin  "my-e-m...@mail.com"
> >        ServerName site.com
> >        ServerAliaswww.site.com
> >        DocumentRoot /usr/local/django/site1
> >        Alias /media/ /usr/local/django/site1/media/
> >        WSGIScriptAlias / /usr/local/django/site1/site1.wsgi
> > </VirtualHost>
>
> > site1.config:
>
> > <VirtualHost*:80>
> >        ServerAdmin  "my-e-m...@mail.com"
> >        ServerName site.com
> >        ServerAlias sub.site.com
> >        DocumentRoot /usr/local/django/site2
> >        Alias /media/ /usr/local/django/site2/media/
> >        WSGIScriptAlias / /usr/local/django/site2/site2.wsgi
> > </VirtualHost>
>
> > bind(e.g.):
>
> > site.com.       IN      A       192.168.1.2 #e.g.
> > sub.site.com.   IN      A       192.168.1.2 #e.g.
>
> > in the wsgi file i have (x=site1, x=site2):
>
> > import os
> > import sys
>
> > os.environ['DJANGO_SETTINGS_MODULE'] = 'x.settings'
>
> > import django.core.handlers.wsgi
> > application = django.core.handlers.wsgi.WSGIHandler()
>
> > Django settings file:
>
> > site1:
> > CACHE_BACKEND = "locmem:///"
> > CACHE_TIMEOUT = 60*5
> > CACHE_PREFIX = "site:1"
>
> > CACHE_BACKEND = "dummy:///"
> > CACHE_TIMEOUT = 60*5
> > CACHE_PREFIX = "site:2"
>
> > but this is not working.
> > I access the site1 and site2 also changes.
>
> > could anyone tell me what am I doing wrong?
> > Thank you.
>
> Are you sure you are hitting the second vhost? It is incorrect to have
> "ServerName site.com" in both vhosts…
>
> Check by enabling different access logs in each vhost, and see which
> site is logged.
>
> One other possible thing to check is that in 1.3,cachesettings come
> from the settings.CACHES dict, not settings.CACHE_* settings.
>
> Cheers
>
> Tom

-- 
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