0

My current setup looks like:

request -> traefik (for https) -> NGINX -> uWSGI

where uWSGI is started with the following opts:

UWSGI_OPTS="--socket /tmp/uwsgi.sock \
            --http 0.0.0.0:5000 \
            ...

The docs say

If your proxy/webserver/router speaks HTTP, you have to tell uWSGI to natively speak the http protocol (this is different from --http that will spawn a proxy by itself):

So I understand the current config as

  • use a socket file /tmp/uwsgi.sock
  • create a http proxy at 0.0.0.0:5000 (for that socket file?)

Now I'd like to remove NGINX.

request -> traefik -> uWSGI

From the docs: traefik does not understand the uwsgi protocol, but it does work to use the http-socket:

UWSGI_OPTS="--http-socket 0.0.0.0:5000 \
            ...

My questions are:

  • the socket file /tmp/uwsgi.sock could be used to bind to NGINX uwsgi_pass unix:///tmp/uwsgi.sock;. As I do not use NGINX anymore I can remove it, correct?
  • http-socket is like the file-socket /tmp/... but does speak http. Where -http does create a proxy like nginx or traefik to use without an proxy before uwsgi, correct?
  • why can I still sucessfully directly curl the uWSGI service http://localhost:5000 even if the uWSGI proxy -http is not present anymore?
toni
  • 139
  • 6

0 Answers0