> Hello > I am attempting to set up development environment for several programmers > each > having a set of python scripts in web context. For that i use nginx to > manage > several domains on same host and uWSGI in dynamic configuration (as far as > i can > see it - proper). Unfortunately, something is still not kosher and desipte > different callables and module names both /command and /report yield same > result > based on whichever was called 1st (uWSGI seems to only instance 1st app > and then > forwards all requests to it rather than differenciate based on request > query/URI) > > http://dpaste.com/348406/ > > Would really appreciate comments on how to make this configuration "sane".
First of all: ./uwsgi -s :1089 -C -M 1 -m --no-site --vhost --uid 106 --gid 106 -P rewrite it to: ./uwsgi -s :1089 -M -m --no-site --vhost --uid 106 --gid 106 as -C is used for unix socket -P is the profiler -M does not take args The uWSGI part is now ok. Now you need to pass the "name of the app" to it using nginx. The name of the app is exposed by the SCRIPT_NAME variable, so a /command/foo must be passed as: SCRIPT_NAME /command PATH_INFO /foo Add uwsgi_param SCRIPT_NAME "xxxxx" to both locations and it will start working. One things left: nginx cannot rewrite PATH_INFO based on SCRIPT_NAME so by default you will end with: SCRIPT_NAME /command PATH_INFO /command/foo To fix this add uwsgi_modifier1 30; to both location directives in nginx.conf -- Roberto De Ioris http://unbit.it _______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
