Opened 10 years ago

Closed 10 years ago

Last modified 9 years ago

#135 closed defect (fixed)

Document mod_python behavior with more than one SETTINGS in a vhost

Reported by: Manuzhai Owned by: jacob
Component: Documentation Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

URL resolving will be unstable if more than one DJANGO_SETTINGS_MODULE is referenced within a vhost (for example, in different locations) due to mod_python caching. This should be documented in the mod_python doc.

Change History (4)

comment:1 Changed 10 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

(In [275]) Fixed #135 -- Added 'Multiple Django installations on the same Apache' to docs/mod_python.txt

comment:2 Changed 10 years ago by mfenniak@…

I believe this can be addressed by using mod_python's PythonInterpreter directive. This can force mod_python to use seperate python interpreter instances. For example:

<Location "/">
    SetHandler python-program
    PythonHandler django.core.handlers.modpython
    SetEnv DJANGO_SETTINGS_MODULE mysite.settings.main
    ...
    PythonInterpreter mysite.main
</Location>

<Location "/admin">
    SetHandler python-program
    PythonHandler django.core.handlers.modpython
    SetEnv DJANGO_SETTINGS_MODULE mysite.settings.admin
    ...
    PythonInterpreter mysite.admin
</Location>

This configuration seems to work for me. The PythonInterpreter directive is documented at http://www.dusek.ch/manual/apache/mod_python/dir-other-pi.html.

comment:3 Changed 10 years ago by anonymous

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:4 Changed 10 years ago by adrian

  • Resolution set to fixed
  • Status changed from reopened to closed

Fixed in [277].

Note: See TracTickets for help on using tickets.
Back to Top