-moi si je me trompe: je peux utiliser gunicorn to deploy a django project, par exemple, je peux déployer mon application - helloapp ainsi:Django + Gunincorn - se déploie et reste connecté au port?
$ cd env
$ . bin/activate
(env) $ cd ..
(env) $ pip install -r requirements.txt
(env) [email protected]:/var/www/html/helloapp# gunicorn helloapp.wsgi:application
[2017-05-18 22:22:38 +0000] [1779] [INFO] Starting gunicorn 19.7.1
[2017-05-18 22:22:38 +0000] [1779] [INFO] Listening at: http://127.0.0.1:8000 (1779)
[2017-05-18 22:22:38 +0000] [1779] [INFO] Using worker: sync
[2017-05-18 22:22:38 +0000] [1783] [INFO] Booting worker with pid: 1783
Alors maintenant, mon site django est en cours d'exécution à http://127.0.0.1:8000.
Mais il ne plus disponible dès que je fermer/sortie mon terminal. Alors, comment puis-je rester connecté au port 8000 même si j'ai fermé mon terminal?
Comment puis-je utiliser Apache à la place? – laukok
Si vous voulez utiliser Apache, vous devriez utiliser son plugin mod_wsgi plutôt que gunicorn. Une fois de plus, il y a une documentation complète à la fois [dans les docs de Django] (https://docs.djangoproject.com/fr/1.11/howto/deployment/wsgi/modwsgi/) et sur [site propre de modwsgi] (https: // modwsgi.readthedocs.io/en/develop/). –
pour mes propres projets dans le futur j'utiliserais le plugin mod_wsgi plutôt que le gunicorn. J'ai ce projet django hérité que je prends en utilisant gunicorn. – laukok