Links
- Docs Home (wiki)
- Features
- Reloading the uWSGI server
- Send
-HUP
to master for graceful reload.-TERM
for hard reload. - Or,
import uwsgi; uwsgi.reload()
. See uwsgi.reload()
- Send
- uWSGI (embedded) module
import uwsgi
- Things to know
- Configuration Options
- Every option can be set in all the supported configuration ways (command line args, environment variables, xml, ini, yaml and LDAP).
- PymoduleAlias
- Vars
UWSGI_SETENV
- Requires
--reload-os-env
- Requires
- Magic Vars
- Examples
- Defining VirtualEnv with DynamicApps
- Managing the uwsgi processes
- Subscription Server
- Tips&Tricks
- With Gevent
- Running on NGinx
- Event / Signal Framework
- FastFuncs
- RPC
- Caching Framework
- Emperor
- uwsgi_modifier1 30
- properly sets PATH_INFO variable.
HowTo
Multiple wsgi apps with nginx and uwsgi
- http://projects.unbit.it/uwsgi/wiki/DynamicApps
- http://wiki.nginx.org/HttpUwsgiModuleMultipleDynamicApplications
- http://projects.unbit.it/uwsgi/wiki/VirtualHosting
Typically, we specify the module
/ --module
param to
uwsgi startup naming the wsgi app to use. Nginx can pass
this param to uwsgi allowing the choice of app to be
specified that way. So here's on way to do it.
Nginx config
include /.../customize/nginx/uwsgi_params; uwsgi_param SCRIPT_NAME $app; uwsgi_param UWSGI_MODULE $app; # Also see http://stackoverflow.com/a/8618323/157154 uwsgi_modifier1 30; #properly sets PATH_INFO variable # The default is "application". # uwsgi_param UWSGI_CALLABLE default_uwsgi_app; # Specifies the virtual env to use. # uwsgi_param UWSGI_PYHOME $document_root; # uwsgi_param UWSGI_CHDIR $document_root; upstream uwsgi_workers_ckck { server unix:/tmp/uwsgi.sock; } server { server_name _ default_server; location ~ /(\w+) { set $app $1; uwsgi_pass uwsgi_workers_ckck; } }
Uwsgi config
uwsgi --socket /tmp/uwsgi.sock --master --vhost --pp $PYTHONPATH