> Hi, and thanks for the example.
>
>
> On Mon, Jan 13, 2014 at 10:07 PM, Roberto De Ioris <[email protected]>
> wrote:
> [snip]
>
>> An example:
>>
>> #app1.py
>> def application(e, sr):
>>     sr('200 OK',[('Content-Type','text/plain')])
>>     return ["app1"]
>>
>> #app2.py
>> def application(e, sr):
>>     sr('200 OK',[('Content-Type','text/plain')])
>>     return ["app2"]
>>
>> uwsgi --mount "/app1=app1.py" --mount "/app2=app2.py" --http-socket
>> :9090
>> --route "^/app1 setapp:/app1" --route "^/app2 setapp:/app2"
>>
>> once an app is mounted you can call it at the request phase using the
>> setapp:<mountpoint> routing action
>
>
> I just tried this using an ini file to run uwsgi.
>
> My understanding is that each command line switch can be converted to ini
> properties, so here the ini file I used:
>
>> [uwsgi]
>> socket = localhost:9090
>> wsgi-file = my_wsgi_server.py
>> processes = 4
>> threads = 2
>>
>> # mounts + routes (example from mailing list)
>> # uwsgi --mount "/app1=app1.py" --mount "/app2=app2.py" --http-socket
> :9090 --route "^/app1 setapp:/app1" --route "^/app2 setapp:/app2"
>> # (where each appN.py file contains an application() function)
>>
>> mount /verify=verify.py
>> route ^/verify setapp:/verify
>
> As before, /verify requests got sent to the "application()" function
> defined in my_wsgi_server.py and not the one in verify.py.
>
> I realized it must be because of the wsgi-file property in line 3.
>
> So I removed it, and restarted uwsgi with this ini file:
>
>> [uwsgi]
>> socket = localhost:9090
>> processes = 4
>> threads = 2
>>
>> # mounts + routes (example from mailing list)
>> # uwsgi --mount "/app1=app1.py" --mount "/app2=app2.py" --http-socket
> :9090 --route "^/app1 setapp:/app1" --route "^/app2 setapp:/app2"
>> # (where each appN.py file contains an application() function)
>>
>> mount /verify=verify.py
>> route ^/verify setapp:/verify
>


mount = /verify=verify.py

and

route = ^/verify setapp:/verify


-- 
Roberto De Ioris
http://unbit.it
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to