[Fixed]-In django + nginx + wsgi, what is a "mysite.sock"

11๐Ÿ‘

โœ…

I am not an expert in this area but I have deployed Django using uWSGI on Nginx with this method. A socket file represents a Unix socket. In this case, uWSGI creates it and it will be through this socket that uWSGI and Nginx will talk to each other.

The โ€œConceptโ€ section of the link you provided talks about it:

uWSGI is a WSGI implementation. In this tutorial we will set up uWSGI
so that it creates a Unix socket, and serves responses to the web
server via the WSGI protocol. At the end, our complete stack of
components will look like this:

the web client <-> the web server <-> the socket <-> uwsgi <-> Django

The first part of the tutorial talks about using TCP port socket to achieve the same result. If you have already followed those steps then you should skip the Unix socket part. However, it also mentions that Unix sockets are better due to less overhead.

๐Ÿ‘คnaiquevin

Leave a comment