Thanks Graham for the fast reply. Unfortunately, I cannot list the
sites directly - too much of them (about 100), and generally I have to
handle all except of 'admin' one :(
On 3 Lip, 13:07, Graham Dumpleton <[EMAIL PROTECTED]> wrote:
> On Jul 3, 8:40 pm, bluszcz <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hello people - I wrote earlier this mail on django devs but Adrian and
> > Graham pointed me, that I should write here.
>
> > I am using Apache 2.0 and mod python 3.3,1 on Ubuntu Dapper x86_64. I
> > found a strange behavior during SetEnv directive. But let's start from
> > the
> > beginning. I have two virtual hosts, one admin and one application,
> > both of them works on the same settings file:
>
> > <VirtualHost *:80>
> > ServerName admin.bluszcz.coke
> > PythonDebug On
> > SetHandler python-program
> > PythonHandler django.core.handlers.modpython
> > PythonPath "sys.path + ['/home/bluszcz/coke/app']"
> > SetEnv DJANGO_SETTINGS_MODULE pepsi.settings
> > SetEnv HOME /home/bluszcz
> > PythonInterpreter Admin
> > SetEnv ADMINOS True
>
> > </VirtualHost>
>
> > <VirtualHost *:80>
> > ServerName bluszcz.coke
> > ServerAlias *.bluszcz.coke
>
> Try listing your site aliases explicitly rather than using a wildcard.
> Maybe the problem is that because the wildcard can match the name of
> your other virtual host, ie., admin.bluszcz.coke, that which one
> Apache sends the request to may be a bit random.
>
> > PythonDebug On
> > SetHandler python-program
> > PythonHandler django.core.handlers.modpython
> > PythonPath "sys.path + ['/home/bluszcz/coke/app']"
> > SetEnv DJANGO_SETTINGS_MODULE pepsi.settings
>
> Do you mean coke.settings here.
>
> > SetEnv HOME /home/bluszcz
> > PythonInterpreter Coke
> > SetEnv ADMINOS False
> > </VirtualHost>
>
> > Graham pointed me also, that SetEnv doesn't work with
> > os.environmodpythonprocessess (as in themodpythonFAQ is wrote), but
> > djangomodpythonhandler has workaround for this.
>
> > Both applications in checks in theirs settings.py
> > os.environ('ADMINOS') and set some variables depending on it.
> > Unfortunately, sometimes - it is very difficult to reproduce and
> > undetermistic - the second one (bluszcz.coke) get value (ADMINOS) from
> > VirtualHost Admin. I set PythonInterpreter (IMVHO) propertly. Any one
> > has idea what is happening?
>
> > Any help would be appreciat.
>
> > Cheers,
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---