dwebsocket+uwsgi+nginx

2019-06-29  本文已影响0人  你猜_19ca
WEBSOCKET_FACTORY_CLASS = 'dwebsocket.backends.uwsgi.factory.uWsgiWebSocketFactory'
...
WSGI_APPLICATION = 'MsgCenter.wsgi.application'
...
# ... with appropriate permissions - may be needed
chmod-socket    = 664
# clear environment on exit
vacuum          = true
enable-threads  = true

http-websockets = true
ugreen = ''
http-timeout = 300
async = 30

ignore-sigpipe = true
ignore-write-errors = true
disable-write-exception = true
...
server {
    listen      8001;
    server_name localhost;
    charset     utf-8;
 
    client_max_body_size 75M;
 
    location / {
        uwsgi_pass  127.0.0.1:8000;
        include     uwsgi_params;
        proxy_redirect off;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
    }
}
上一篇 下一篇

猜你喜欢

热点阅读