7
GeoDjango uses the GDAL geospatial library which is
8
not thread safe at this time. Thus, it is *highly* recommended
9
to not use threading when deploying -- in other words, use a
10
an appropriate configuration of Apache or the prefork method
11
when using FastCGI through another web server.
15
In this section there are some example ``VirtualHost`` directives for
16
when deploying using either ``mod_python`` or ``mod_wsgi``. At this
17
time, we recommend ``mod_wsgi``, as it is now officially recommended
18
way to deploy Django applications with Apache. Moreover, if
19
``mod_python`` is used, then a prefork version of Apache must also be
20
used. As long as ``mod_wsgi`` is configured correctly, it does not
21
matter whether the version of Apache is prefork or worker.
25
The ``Alias`` and ``Directory`` configurations in the the examples
26
below use an example path to a system-wide installation folder of Django.
27
Substitute in an appropriate location, if necessary, as it may be
28
different than the path on your system.
36
WSGIDaemonProcess geodjango user=geo group=geo processes=5 threads=1
37
WSGIProcessGroup geodjango
38
WSGIScriptAlias / /home/geo/geodjango/world.wsgi
40
Alias /media/ "/usr/lib/python2.5/site-packages/django/contrib/admin/media/"
41
<Directory "/usr/lib/python2.5/site-packages/django/contrib/admin/media/">
45
IndexOptions FancyIndexing
52
If the ``WSGIDaemonProcess`` attribute ``threads`` is not set to ``1``, then
53
Apache may crash when running your GeoDjango application. Increase the
54
number of ``processes`` instead.
56
For more information, please consult Django's
57
:ref:`mod_wsgi documentation <howto-deployment-modwsgi>`.
68
PythonHandler django.core.handlers.modpython
69
SetEnv DJANGO_SETTINGS_MODULE world.settings
71
PythonPath "['/var/www/apps'] + sys.path"
74
Alias /media/ "/usr/lib/python2.5/site-packages/django/contrib/admin/media/"
83
When using ``mod_python`` you *must* be using a prefork version of Apache, or
84
else your GeoDjango application may crash Apache.
86
For more information, please consult Django's
87
:ref:`mod_python documentation <howto-deployment-modpython>`.