{"title":"部署 GeoDjango","version":"6.0","locale":"zh-hans","docname":"ref/contrib/gis/deployment","url":"/zh-hans/6.0/ref/contrib/gis/deployment/","canonical":"https://djangodocs.dev/zh-hans/6.0/ref/contrib/gis/deployment/","summary":"基本上，部署一个 GeoDjango 应用和部署一个普通的 Django 应用没有什么不同。请参考 Django 的 部署文档 。 Warning GeoDjango uses the GDAL geospatial library which is not thread safe at this time. Thus, it…","html":"<h1>部署 GeoDjango<a class=\"heading-anchor\" href=\"#deploying-geodjango\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h1>\n<p>基本上，部署一个 GeoDjango 应用和部署一个普通的 Django 应用没有什么不同。请参考 Django 的 <a class=\"reference internal\" href=\"/zh-hans/6.0/howto/deployment/\"><span class=\"doc\">部署文档</span></a>。</p>\n<aside class=\"admonition admonition-warning\" role=\"note\">\n<p class=\"admonition-title\">Warning</p>\n<p>GeoDjango uses the GDAL geospatial library which is\nnot thread safe at this time. Thus, it is <em>highly</em> recommended\nto not use threading when deploying -- in other words, use an\nappropriate configuration of Apache.</p>\n<p>For example, when configuring your application with <code class=\"docutils literal notranslate\"><span class=\"pre\">mod_wsgi</span></code>,\nset the <code class=\"docutils literal notranslate\"><span class=\"pre\">WSGIDaemonProcess</span></code> attribute <code class=\"docutils literal notranslate\"><span class=\"pre\">threads</span></code> to <code class=\"docutils literal notranslate\"><span class=\"pre\">1</span></code>, unless\nApache may crash when running your GeoDjango application. Increase the\nnumber of <code class=\"docutils literal notranslate\"><span class=\"pre\">processes</span></code> instead.</p>\n</aside>","rootId":"deploying-geodjango","toc":[],"breadcrumbs":[{"docname":"ref/index","title":"API 参考","url":"/zh-hans/6.0/ref/"},{"docname":"ref/contrib/index","title":"contrib 包","url":"/zh-hans/6.0/ref/contrib/"},{"docname":"ref/contrib/gis/index","title":"GeoDjango","url":"/zh-hans/6.0/ref/contrib/gis/"}],"prev":{"docname":"ref/contrib/gis/testing","title":"测试 GeoDjango 应用程序","url":"/zh-hans/6.0/ref/contrib/gis/testing/"},"next":{"docname":"ref/contrib/humanize","title":"django.contrib.humanize","url":"/zh-hans/6.0/ref/contrib/humanize/"},"formats":{"html":"/zh-hans/6.0/ref/contrib/gis/deployment/","markdown":"/zh-hans/6.0/ref/contrib/gis/deployment.md","json":"/zh-hans/6.0/ref/contrib/gis/deployment.json"},"source":"https://github.com/django/django/blob/stable/6.0.x/docs/ref/contrib/gis/deployment.txt","official":"https://docs.djangoproject.com/zh-hans/6.0/ref/contrib/gis/deployment/","inVersions":["6.1","6.0","5.2","5.1","5.0","4.2","4.1","4.0","3.2","3.1","3.0","2.2","2.1","2.0"],"inLocales":["en","sv","zh-hans","ga","fr","ja","id","it","pt-br","ko","es","el","pl"]}