Running Django 2.2.3 in Apache2

30 views
Skip to first unread message

Block QAI

unread,
Jul 17, 2019, 11:26:04 AM7/17/19
to Django users
Group,

We have been working for days attempting to get Django to run under apache2 on a Ubuntu 18.04 server.  Are there ANY clear documentation with steps we ,could leverage to ensure a successful, simple, direct install.

Very much appreciate the assistance.


Ing.Daniel Bojorge

unread,
Jul 17, 2019, 11:29:59 AM7/17/19
to django...@googlegroups.com
I hope be useful for you


I have class in video in the course in Udemy, all in spanish

Mi Blog
Nicaragua

"Si ustedes permanecen unidos a mí, y si permanecen fieles a mis enseñanzas, pidan lo que quieran y se les dará.
(Juan 15:7 DHH)
Bendito el varón que se fía en el SEÑOR, y cuya confianza es el SEÑOR.
(Jeremías 17:7 RV2000)



--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/60ecd0a7-f485-4a8d-9580-efa196998bea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Yoo

unread,
Jul 17, 2019, 10:48:12 PM7/17/19
to Django users
https://www.sysadmin.md/deploy-django-in-production-using-apache-nginx-and-mod-wsgi.html
https://stackoverflow.com/questions/18048318/apache-mod-wsgi-vs-nginx-gunicorn
There are several fantastic tutorials online regarding apache2 and mod_wsgi. A simple google search with the keywords apache2 and mod_wsgi should grant you a couple. What I did when I deployed on nginx and gunicorn (which I highly recommend over apache combinations. Read SO post) was I compared two tutorials and made sure they were pretty similar.

Besides preference in performance and how requests are served etc. etc., I just found nginx + gunicorn much easier to setup. Good luck!

(Now my tangent recommendation. Hope the above helped!)

If you get stuck somewhere with apache2 and mod_wsgi, try out nginx and gunicorn with these links:
(BEFORE YOU GO ON. There is an error in the SECOND tutorial (the digitalocean one. When doing gunicorn --bind 0.0.0.0:8000 myproject.wsgi, make sure you type in gunicorn --bind 0.0.0.0:8000 myproject.wsgi:application).

http://www.oneclicksimplify.com/jessie.html (simple and works for most Linux-based systems)


(Has a conclusion which'll help you debug stuff. If you get stuck or you don't see a symlink being created, do sudo systemctl stop gunicorn && sudo systemctl disable gunicorn && sudo systemctl enable gunicorn && sudo systemctl start gunicorn .  Or you you can switch gunicorn with nginx.)
They both use postgres for database, but you can skip those steps if you'd like. No harm.
Reply all
Reply to author
Forward
0 new messages