Python Forum
Can I connect python/django to nginx "after the fact"?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can I connect python/django to nginx "after the fact"?
#1
This tutorial describes how to get python and django up and running:

https://www.digitalocean.com/community/t...untu-16-04

What I want to know is- once I get that all working, can I connect it to nginx after that? Or should I be starting the entire thing with nginx connecting to wsgi first beforehand; before I do that tutorial?

This (outdated and/or flawed) tutorial is connecting uWSGI to nginx beforehand:

https://uwsgi-docs.readthedocs.io/en/lat...figuration

But if I've already got regular python/django running outside of nginx in the first tutorial above), is it going to be difficult (or impossible) to connect it to nginx?

You see I don't want to go down the path to end up with a dead end- the goal is to get nginx to talk to it; not run django server entirely independently.

Also I found this:

https://serverfault.com/questions/590819...have-uwsgi

thanks
Reply
#2
I'm not really sure what you're asking. NGINX is a (reverse) proxy and runs independently of your app. All you should need to do is write the NGINX configuration file that points to the app and then just make sure the clients are actually talking to NGINX, rather than the app directly.
Reply
#3
(Jan-25-2020, 06:04 PM)ndc85430 Wrote: I'm not really sure what you're asking. NGINX is a (reverse) proxy and runs independently of your app. All you should need to do is write the NGINX configuration file that points to the app and then just make sure the clients are actually talking to NGINX, rather than the app directly.

Again; I want nginx to talk to uWSGI, as opposed to running a python script for the django app to run a server on it's own. I want to run the actual uWSGI server as in this tutorial:

https://docs.djangoproject.com/en/3.0/ho...sgi/uwsgi/

I should really open up a new thread, this one is weeks old and I've already done the non-uwsgi tutorial I specified in the op post.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  python socket connect only sometimes espDino 0 1,501 Jul-15-2020, 12:13 PM
Last Post: espDino

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020