flask-uwsgi-websocket
flask-uwsgi-websocket copied to clipboard
How to run uwsgi-websocket behind Apache
Hello, I am trying to use the GeventWebsocket in an apache + uwsgi + flask product, so I already have an uwsgi instance in my app, and I know it'll start another uwsgi instance in the method Websocket.init_app(). I 'd like to know how should I modify the uwsgi config to use the same uwsgi with websocket and http works, should I not invoke the method Websocket.init_app() in the code ?
here is my config of apache and uwsgi:
apache config:
<VirtualHost *:80>
ProxyPass / uwsgi://127.0.0.1:5001/
</VirtualHost>
uwsgi config:
[uwsgi]
#application's base info
base = /srv/www/myProject
project = myProject
socket = 127.0.0.1:5001
chmod-socket = 666
processes = 2
master = 1
buffer-size = 8192
pyhome = %(base)/venv
pythonpath = %(base)/%(project)/src
#python module to import
wsgi-file = %(base)/%(project)/src/web/manage.py
callable = app
#location of log files
logto = %(base)/log/uwsgi/%n.log
start uwsgi:
uwsgi --master --emperor /etc/uwsgi/vassals --die-on-term --uid root --gid root
Actually I'm not very good at uwsgi, thank you in advance.