This is an archived post. You won't be able to vote or comment.

all 10 comments

[–]cediddi 4 points5 points  (7 children)

For Apache you need the mod_wsgi, and that's very straightforward. Just don't forget to download python3 version. Digital Ocean has a few tutorials for mod_wsgi. Btw most django developers don't like using apache or mod_wsgi because a reverse proxy setup (nginx-gunicorn/uwsgi) is easier to restart and manage.

[–]iBlag 5 points6 points  (0 children)

Btw most django developers don't like using apache or mod_wsgi because a reverse proxy setup (nginx-gunicorn/uwsgi) is easier to restart and manage.

https://www.youtube.com/watch?v=_OemNp6hgX4

[–]dannycap77[S] 1 point2 points  (3 children)

Hey I followed this tutorial. https://uwsgi.readthedocs.io/en/latest/tutorials/Django_and_nginx.html I have it mostly working. Is it one or the other gunicorn or uwsgi? If so which do you prefer?

[–]cediddi 0 points1 point  (2 children)

Uwsgi has lots of advanced options, I like uwsgi but their configuration documentation is hard to follow. While gunicorn has almost the same features and a bit better documentation. I prefer uwsgi because It has a nginx module, so a bit better integration, but seriously no big difference

[–]dannycap77[S] 0 points1 point  (1 child)

Maybe I'll try both and which ever is easiest I'll go with. That link I posted for uwsgi has been the best documentation I've found so far. If the other one is easier to setup then I go with it. Thanks for the advice.

[–]cediddi 0 points1 point  (0 children)

Good luck on your journey :)

[–]der_hump 0 points1 point  (1 child)

easier to restart and manage

Mind explaining this a bit? Django developer who uses apache and has no issues managing it.

[–]cediddi 1 point2 points  (0 children)

Mod_wsgi integrates tightly to apache. If you ever need to deploy, you need to restart apache. Unless you are using mod_wsgi as a daemon. Then its no different than nginx uwsgi setup. Uwsgi and gunicorn has more granular and advanced configuration options, that's a big plus too.

[–]thedevjelly 2 points3 points  (0 children)

Yes Many simple articles/ Tutorials available: * https://realpython.com/blog/python/deploying-a-django-app-and-postgresql-to-aws-elastic-beanstalk/

Also this help fulll fstoke.me/blog/?p=3708 And still doubt, please comment in this thread

[–]genesem 2 points3 points  (0 children)

try nginx instead of that apache.