我正在尝试使用uwsgi在linux上运行flask。我的and服务器是nginx。但它不起作用。
我正在使用Vmware for linux。我的HostPC是Window。
我在guestPC(linux)和hostPC之间共享文件。
linux上的shared_folder路径为/mnt/hgfs/shared_folder/web
我在/venv/web上创建了目录,并将该目录web链接到/mnt/hfs/shared_folder/web,并在/venv/web上创建了uwsgi.ini文件
cat uwsgi.ini:
[uwsgi]
module=run:app
master=true
processes=5
socket=web.sock
chmord-socket=660
vacuum=true
die-on-term=true
logto=%n.log日志文件为:
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
bind(): No such file or directory [core/socket.c line 230]但是当我将ini文件移到/venv/时,它不是与window共享的目录。我用下面的命令行运行它: uwsgi uwsgi.ini。它起作用了。
我在linux上制作了这个ini文件,它的格式是ASCII。
我做错了什么??
发布于 2020-07-23 02:41:29
你可以忽略“雷电锁”的警告。
问题很可能是这两行
socket=web.sock
chmord-socket=660首先,使用套接字的绝对路径,以避免uwsgi在不可写的工作目录中启动的情况。
socket=/tmp/web.sock然后修复拼写错误(chmod,而不是chmord)
chmod-socket=660还要考虑为logto文件提供绝对路径。
https://stackoverflow.com/questions/63038408
复制相似问题