{"title":"Come installare Django con Gunicorn","version":"5.1","locale":"it","docname":"howto/deployment/wsgi/gunicorn","url":"/it/5.1/howto/deployment/wsgi/gunicorn/","canonical":"https://djangodocs.dev/it/5.1/howto/deployment/wsgi/gunicorn/","summary":"Gunicorn (“Green Unicorn”) è un server Python puro per UNIX. Non ha dipendenze e può essere installato usando pip . Installazione Gunicorn Link to this heading #…","html":"<h1>Come installare Django con 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=\"https://gunicorn.org/\">Gunicorn</a> (“Green Unicorn”) è un server Python puro per UNIX. Non ha dipendenze e può essere installato usando <code class=\"docutils literal notranslate\"><span class=\"pre\">pip</span></code>.</p>\n<section id=\"installing-gunicorn\">\n<h2>Installazione 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>Installa gunicorn lanciando  <code class=\"docutils literal notranslate\"><span class=\"pre\">python</span> <span class=\"pre\">-m</span> <span class=\"pre\">pip</span> <span class=\"pre\">install</span> <span class=\"pre\">gunicorn</span></code>. Per maggiori dettagli, guarda <a class=\"reference external\" href=\"https://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>Girare Django in Gunicorn come una applicazione generica WSGI<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. The simplest invocation of gunicorn is to pass the\nlocation of a module containing a WSGI application object named\n<code class=\"docutils literal notranslate\"><span class=\"pre\">application</span></code>, which for a typical Django project would look like:</p>\n<div class=\"code-block\" data-language=\"shell\"><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>Avvierà un processo su cui gira un thread in ascolto su <code class=\"docutils literal notranslate\"><span class=\"pre\">127.0.0.1:8000</span></code>. Richiede che il tuo progetto sia sul percorso Python; il modo più semplice di assicurartene è lanciare il comando dalla stessa directory in cui si trova il file <code class=\"docutils literal notranslate\"><span class=\"pre\">manage.py</span></code>.</p>\n<p>Vedi la <a class=\"reference external\" href=\"https://docs.gunicorn.org/en/latest/deploy.html\">documentazione per il deploy</a> di Gunicorn per consigli aggiuntivi.</p>\n</section>","rootId":"how-to-use-django-with-gunicorn","toc":[{"title":"Installazione Gunicorn","anchor":"installing-gunicorn","children":[]},{"title":"Girare Django in Gunicorn come una applicazione generica WSGI","anchor":"running-django-in-gunicorn-as-a-generic-wsgi-application","children":[]}],"breadcrumbs":[{"docname":"howto/index","title":"How-to guides","url":"/it/5.1/howto/"},{"docname":"howto/deployment/index","title":"Come distribuire Django","url":"/it/5.1/howto/deployment/"},{"docname":"howto/deployment/wsgi/index","title":"Come distribuire con WSGI.","url":"/it/5.1/howto/deployment/wsgi/"}],"prev":{"docname":"howto/deployment/wsgi/index","title":"Come distribuire con WSGI.","url":"/it/5.1/howto/deployment/wsgi/"},"next":{"docname":"howto/deployment/wsgi/uwsgi","title":"Come usare Django con uWSGI","url":"/it/5.1/howto/deployment/wsgi/uwsgi/"},"formats":{"html":"/it/5.1/howto/deployment/wsgi/gunicorn/","markdown":"/it/5.1/howto/deployment/wsgi/gunicorn.md","json":"/it/5.1/howto/deployment/wsgi/gunicorn.json"},"source":"https://github.com/django/django/blob/stable/5.1.x/docs/howto/deployment/wsgi/gunicorn.txt","official":"https://docs.djangoproject.com/it/5.1/howto/deployment/wsgi/gunicorn/","inVersions":["6.1","6.0","5.2","5.1","5.0","4.2","4.1","4.0","3.2"],"inLocales":["en","zh-hans","fr","ja","id","it","pt-br","ko","es","el","pl"]}