| | 66 | Multiple Django installations on the same Apache |
|---|
| | 67 | ================================================ |
|---|
| | 68 | |
|---|
| | 69 | It's entirely possible to run multiple Django installations on the same Apache |
|---|
| | 70 | instance. Just use ``VirtualHost`` for that, like so:: |
|---|
| | 71 | |
|---|
| | 72 | NameVirtualHost * |
|---|
| | 73 | |
|---|
| | 74 | <VirtualHost *> |
|---|
| | 75 | ServerName www.example.com |
|---|
| | 76 | # ... |
|---|
| | 77 | SetEnv DJANGO_SETTINGS_MODULE myproject.settings.main |
|---|
| | 78 | </VirtualHost> |
|---|
| | 79 | |
|---|
| | 80 | <VirtualHost *> |
|---|
| | 81 | ServerName admin.example.com |
|---|
| | 82 | # ... |
|---|
| | 83 | SetEnv DJANGO_SETTINGS_MODULE myproject.settings.admin |
|---|
| | 84 | </VirtualHost> |
|---|
| | 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. |
|---|
| | 90 | |
|---|