{"title":"部署 GeoDjango","version":"4.1","locale":"zh-hans","docname":"ref/contrib/gis/deployment","url":"/zh-hans/4.1/ref/contrib/gis/deployment/","canonical":"https://djangodocs.dev/zh-hans/4.1/ref/contrib/gis/deployment/","summary":"基本上，部署一个 GeoDjango 应用和部署一个普通的 Django 应用没有什么不同。请参考 Django 的 部署文档 。 Warning GeoDjango 使用的 GDAL 地理空间库目前还不是线程安全的。 因此， 强烈 建议在部署时不要使用线程 —— 换句话说，使用适当的 Apache 配置。 例如，当用…","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/4.1/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 使用的 GDAL 地理空间库目前还不是线程安全的。 因此， <em>强烈</em> 建议在部署时不要使用线程 —— 换句话说，使用适当的 Apache 配置。</p>\n<p>例如，当用 <code class=\"docutils literal notranslate\"><span class=\"pre\">mod_wsgi</span></code> 配置你的应用程序时，将 <code class=\"docutils literal notranslate\"><span class=\"pre\">WSGIDaemonProcess</span></code> 属性 <code class=\"docutils literal notranslate\"><span class=\"pre\">threads</span></code> 设置为 <code class=\"docutils literal notranslate\"><span class=\"pre\">1`</span></code>，除非 Apache 在运行 GeoDjango 应用程序时可能会崩溃。 转而增加 <code class=\"docutils literal notranslate\"><span class=\"pre\">processes</span></code> 的数量。</p>\n</aside>","rootId":"deploying-geodjango","toc":[],"breadcrumbs":[{"docname":"ref/index","title":"API 参考","url":"/zh-hans/4.1/ref/"},{"docname":"ref/contrib/index","title":"contrib 包","url":"/zh-hans/4.1/ref/contrib/"},{"docname":"ref/contrib/gis/index","title":"GeoDjango","url":"/zh-hans/4.1/ref/contrib/gis/"}],"prev":{"docname":"ref/contrib/gis/testing","title":"Testing GeoDjango apps","url":"/zh-hans/4.1/ref/contrib/gis/testing/"},"next":{"docname":"ref/contrib/humanize","title":"django.contrib.humanize","url":"/zh-hans/4.1/ref/contrib/humanize/"},"formats":{"html":"/zh-hans/4.1/ref/contrib/gis/deployment/","markdown":"/zh-hans/4.1/ref/contrib/gis/deployment.md","json":"/zh-hans/4.1/ref/contrib/gis/deployment.json"},"source":"https://github.com/django/django/blob/stable/4.1.x/docs/ref/contrib/gis/deployment.txt","official":"https://docs.djangoproject.com/zh-hans/4.1/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","zh-hans","fr","ja","id","it","pt-br","ko","es","el","pl"]}