在django nginx wsgi中,什么是“mysite.sock”

我知道我的问题一定是非常愚蠢的,因为我无法找到任何关于它的事情,即使是堆栈溢出,但这真的是一个问题.

我跟着this doc,几乎一切顺利,直到“mysite.sock”发生.这样发生:

server unix:///path/to/your/mysite/mysite.sock; # for a file socket
# server 127.0.0.1:8001; # for a web port socket (we'll use this first)

这个文件没有提到任何有关“mysite.sock”的信息,经过一天的搜索,我没有发现任何内容,而我的django网站需要在48小时内上网,所以我必须要求帮助.

最佳答案
我不是这方面的专家,但是我已经用这种方法Nginx上部署了使用uWsgi的Django.套接文件表示Unix套接字.在这种情况下,uWsgi会创建它,并且将通过此套接字uWsgiNginx将彼此通信.

您提供的链接Concept”部分谈到:

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

本教程的第一部分将介绍如何使用TCP端口套接字实现相同的结果.如果您已经遵循了这些步骤,那么您应该跳过Unix套接字部分.不过,也提到Unix sockets are better due to less overhead.

相关文章

Nginx (engine x) 是一个高性能的HTTP和反向代理服务,也是一...
本地项目配置 1 复制 luffy/settings/dev.py为prop.py 修改l...
nginx不仅可以隐藏版本信息,还支持自定义web服务器信息 先看...
一 、此次漏洞分析 1 nginx HTTP/2漏洞 [nginx-announce] ng...
###进入nginx 目录cd /usr/local/nginx###递归显示 2 级目录...
在cmd命令窗口输入下面命令进行查看 tasklist /fi "ima...