I'm trying to use uWSGI as a standalone http server, not a uwsgi server.
Here' my configuration file mysite.ini
:
[uwsgi]
chdir = /srv/workflows
module = workflows.wsgi:application
plugin = python
# We can receive connections either via http or from frontend via uwsgi socket
# http:
http = 0.0.0.0:8000
# uwsgi:
#socket = 0.0.0.0:8000
#chmod-socket = 664
vacuum = true
master = true
need-app = true
processes = 10
harakiri = 20
max-requests = 5000
So, I used http option and commented-out socket
and chmod-socket
options.
In response to that uWSGI curses:
uWSGI: --s/--socket option is missing and stdin is not a socket.
Do I understand it right, that if I specify socket
option, uWSGI expects connection to implement WSGI protocol? And if I specify http
option, it expects connection to be http and I shouldn't specify the socket
option in that case.
答案 0 :(得分:4)
尝试使用http-socket而不是http
答案 1 :(得分:1)
如果要在网络中使用http,则官方文档建议在Nginx或Apache之后将http
用于公共服务器,将http-socket
用于网络服务器。
https://uwsgi-docs.readthedocs.io/en/latest/ThingsToKnow.html
答案 2 :(得分:0)
对我来说,HTTP工作正常而不是TCP连接的套接字
示例:http = 127.0.0.1:8080