On Jun 23, 9:42 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying to configure mod_python on apache on a home Ubuntu machine > -- hoping to direct 127.0.0.1:80 to a django project, let's call it > foo. > > in my /etc/apache2/httpd.conf, I'm told by this django > page:http://www.djangoproject.com/documentation/modpython/ > > to add this: > <Location "/mysite/"> > SetHandler python-program > PythonHandler django.core.handlers.modpython > SetEnv DJANGO_SETTINGS_MODULE mysite.settings > PythonDebug On > </Location> > > So for my root site, would I want to do this? > <Location "/"> > SetHandler python-program > PythonHandler django.core.handlers.modpython > SetEnv DJANGO_SETTINGS_MODULE foo.settings > PythonDebug On > </Location>
If you are going to have them both within the one VirtualHost, you must use PythonInterpreter directive to force each Django instance to run in a different Python sub interpreter. You also need to make sure in your settings.py file that you have set SESSION_COOKIE_NAME to different values for each Django site else there sessions will interfere with each other. Graham > I want to store images and such in /var/www/images. Templates that > refer to images and css can just refer to them in that fashion. So an > <img src="/images/somePic.jpg"> in a template would load the right > image -- though the template does not live in /var/www. Right? > > Also, what is the easiest way to restart Apache so that changes to > the /var/www/httpd.conf stick? > > Any help would be greatly appreciated. > > Thanks, > Ivan Kirigin --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---