Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added note about using different settings modules in the same virtual…

… host

(thanks steadicat).


git-svn-id: http://code.djangoproject.com/svn/django/trunk@277 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 7af62f48e33c5e392b6978607e312f4e033f1de4 1 parent 78cff18
Jacob Kaplan-Moss authored July 21, 2005

Showing 1 changed file with 19 additions and 4 deletions. Show diff stats Hide diff stats

  1. 23  docs/modpython.txt
23  docs/modpython.txt
@@ -83,10 +83,25 @@ instance. Just use ``VirtualHost`` for that, like so::
83 83
         SetEnv DJANGO_SETTINGS_MODULE myproject.settings.admin
84 84
     </VirtualHost>
85 85
 
86  
-Don't put two Django installations within the same ``VirtualHost``. Due to the
87  
-way mod_python caches code in memory, your two Django installations will
88  
-conflict. If you can think of a way to solve this problem, please file a ticket
89  
-in our ticket system.
  86
+If you need to put two Django installations within the same ``VirtualHost``,
  87
+you'll see problems due to the way mod_python caches code in memory.  To fix
  88
+this problem, you'll need to use the ``PythonInterpreter`` directive to give
  89
+different ``<Location>``s seperate interpreters::
  90
+
  91
+    <VirtualHost *>
  92
+        ServerName www.example.com
  93
+        # ...
  94
+        <Location "/something">
  95
+            SetEnv DJANGO_SETTINGS_MODULE myproject.settings.main
  96
+            PythonInterpreter myproject_main
  97
+        </Location>
  98
+        
  99
+        <Location "/admin">
  100
+            SetEnv DJANGO_SETTINGS_MODULE myproject.settings.admin
  101
+            PythonInterpreter myproject_admin
  102
+        </Location>
  103
+    </VirtualHost>
  104
+
90 105
 
91 106
 Running a development server with mod_python
92 107
 ============================================

0 notes on commit 7af62f4

Please sign in to comment.
Something went wrong with that request. Please try again.