{"title":"How to use Django with Gunicorn","version":"1.10","locale":"ja","docname":"howto/deployment/wsgi/gunicorn","url":"/ja/1.10/howto/deployment/wsgi/gunicorn/","canonical":"https://djangodocs.dev/ja/1.10/howto/deployment/wsgi/gunicorn/","summary":"Gunicorn ('Green Unicorn') is a pure-Python WSGI server for UNIX. It has no dependencies and is easy to install and use. Installing Gunicorn Link to this heading #…","html":"<h1>How to use Django with Gunicorn<a class=\"heading-anchor\" href=\"#how-to-use-django-with-gunicorn\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h1>\n<p><a class=\"reference external\" href=\"http://gunicorn.org/\">Gunicorn</a> ('Green Unicorn') is a pure-Python WSGI server for UNIX. It has no\ndependencies and is easy to install and use.</p>\n<section id=\"installing-gunicorn\">\n<h2>Installing Gunicorn<a class=\"heading-anchor\" href=\"#installing-gunicorn\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>Installing gunicorn is as easy as <code class=\"docutils literal notranslate\"><span class=\"pre\">pip</span> <span class=\"pre\">install</span> <span class=\"pre\">gunicorn</span></code>. For more\ndetails, see the <a class=\"reference external\" href=\"http://docs.gunicorn.org/en/latest/install.html\">gunicorn documentation</a>.</p>\n</section>\n<section id=\"running-django-in-gunicorn-as-a-generic-wsgi-application\">\n<h2>Running Django in Gunicorn as a generic WSGI application<a class=\"heading-anchor\" href=\"#running-django-in-gunicorn-as-a-generic-wsgi-application\"><span class=\"visually-hidden\">Link to this heading</span><span aria-hidden=\"true\">#</span></a></h2>\n<p>When Gunicorn is installed, a <code class=\"docutils literal notranslate\"><span class=\"pre\">gunicorn</span></code> command is available which starts\nthe Gunicorn server process. At its simplest, gunicorn just needs to be called\nwith the location of a module containing a WSGI application object named\napplication. So for a typical Django project, invoking gunicorn would look\nlike:</p>\n<div class=\"code-block\" data-language=\"bash\"><div class=\"code-block-toolbar\"><span class=\"code-block-language\">Shell</span><button type=\"button\" class=\"copy-button\" data-copy hidden><span class=\"copy-button-label\">Copy</span></button></div><pre role=\"group\" tabindex=\"0\" aria-label=\"Shell code\"><code>gunicorn<span class=\"w\"> </span>myproject.wsgi\n</code></pre></div>\n<p>This will start one process running one thread listening on <code class=\"docutils literal notranslate\"><span class=\"pre\">127.0.0.1:8000</span></code>.\nIt requires that your project be on the Python path; the simplest way to ensure\nthat is to run this command from the same directory as your <code class=\"docutils literal notranslate\"><span class=\"pre\">manage.py</span></code> file.</p>\n<p>See Gunicorn's <a class=\"reference external\" href=\"http://docs.gunicorn.org/en/latest/deploy.html\">deployment documentation</a> for additional tips.</p>\n</section>","rootId":"how-to-use-django-with-gunicorn","toc":[{"title":"Installing Gunicorn","anchor":"installing-gunicorn","children":[]},{"title":"Running Django in Gunicorn as a generic WSGI application","anchor":"running-django-in-gunicorn-as-a-generic-wsgi-application","children":[]}],"breadcrumbs":[{"docname":"howto/index","title":"「How-to」ガイド","url":"/ja/1.10/howto/"},{"docname":"howto/deployment/index","title":"Django をデプロイする","url":"/ja/1.10/howto/deployment/"},{"docname":"howto/deployment/wsgi/index","title":"WSGI とともにデプロイするには","url":"/ja/1.10/howto/deployment/wsgi/"}],"prev":{"docname":"howto/deployment/wsgi/apache-auth","title":"Django のユーザーデータベースに対する Apache からの認証","url":"/ja/1.10/howto/deployment/wsgi/apache-auth/"},"next":{"docname":"howto/deployment/wsgi/uwsgi","title":"How to use Django with uWSGI","url":"/ja/1.10/howto/deployment/wsgi/uwsgi/"},"formats":{"html":"/ja/1.10/howto/deployment/wsgi/gunicorn/","markdown":"/ja/1.10/howto/deployment/wsgi/gunicorn.md","json":"/ja/1.10/howto/deployment/wsgi/gunicorn.json"},"source":"https://github.com/django/django/blob/stable/1.10.x/docs/howto/deployment/wsgi/gunicorn.txt","official":"https://docs.djangoproject.com/ja/1.10/howto/deployment/wsgi/gunicorn/","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","1.11","1.10","1.9"],"inLocales":["en","fr","ja","id","pt-br","es","el","pl"]}