>>> >>> >> >>Do you want to avoid to add a nginx rule for each app, or it is not a >>problem ? > > Yes, we'd prefer not to have to restart or SIGHUP nginx. Or mess with > nginx config for that matter. > > Thanks, > Duane > >
Ok, be prepared for some heavy metal :P this is the core of the system: http://projects.unbit.it/uwsgi/wiki/InternalRouting First of all add a vassal doing only routing (the one to which nginx connect to): [uwsgi] master = true socket = :9000 ; X should be the sum of all the workers ; be large as threads are really cheap threads = X ; route them all route = ^/app0 uwsgi:127.0.0.1:4040,5,0 route = ^/app1 uwsgi:127.0.0.1:4041,5,0 route = ^/app2 uwsgi:127.0.0.1:4042,5,0 Now defines a vassal for each app: [uwsgi] socket = 127.0.0.1:4040 mount = /app0=foobar.psgi manage-script-name = true master = true processes = 4 Obviously you can avoid mount and manage-script-name if your app is smart/configurable enough to strip the initial part Finally, leave nginx configuration as the one you posted (you can remove SCRIPT_NAME definition if you want as it is unneded) -- Roberto De Ioris http://unbit.it _______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
