Home  >  Q&A  >  body text

nginx - Why can't gunicorn handle wsgi directly?

According to the configuration on nginx, it is proxy_pass, not uwsgi_pass, so doesn’t it mean that upstream to gunicorn is also in HTTP format? Then gunicorn is converted to WSGI to start the Application?

習慣沉默習慣沉默2713 days ago555

reply all(1)I'll reply

  • 我想大声告诉你

    我想大声告诉你2017-05-16 17:25:09

    I am answering my own question. After a day of research, it turns out that wsgi is a programming standard, not a socket protocol. This is different from fastcgi, which is a communication protocol
    wsgi specifies a function with two parameters as the interface method environ, startresponse
    gunicorn is a webserver that can call wsgi standard programs. If you don't want to use it, you can replace it with mod_wsgi+Python app. However, the performance may not be that good, and modwsgi has many problems and is not maintained.

    In addition, uwsgi is a server based on wsgi. These two things are easy to get together

    reply
    0
  • Cancelreply