> Hi Roberto,
>
> On Thu, Jan 16, 2014 at 12:58 AM, Roberto De Ioris <[email protected]>
> wrote:
> [snip]
>
>>
>> mount = /verify=verify.py
>>
>> and
>>
>> route = ^/verify setapp:/verify
>>
>
> Thank you for correcting the syntax.
>
> I was hoping to use mount+route (or whatever the best
> alternative/equivalent is) to define a finite number of url endpoints,
> with
> a "catch-all" handler function for everything else.
>
> When I use the two lines as shown above, requests to /verify do get passed
> to the verify.py script.
>
> But when I added a second pair of lines like this:
>
> mount = /login=login.py
> route = ^/login setapp:/login
>
> Making a browser request to /login gave me a 500 error:
>
> 2014/01/18 18:18:29 [error] 2534#0: *10 connect() failed (111: Connection
> refused) while connecting to upstream, client: ::1, server: , request:
> "GET
> /login HTTP/1.1", upstream: "uwsgi://[::1]:9090", host: "localhost"
> 2014/01/18 18:18:29 [error] 2534#0: *10 upstream prematurely closed
> connection while reading response header from upstream, client: ::1,
> server: , request: "GET /login HTTP/1.1", upstream:
> "uwsgi://127.0.0.1:9090",
> host: "localhost"
>
> Is mount+route only allowed once?
>


nope, you can have as many as you need/want

the error means some misconfiguration in the nginx side, can you post its
config ?

your usage is pretty "ortodox", but take in account each app is loaded in
a new python interpreter. This is good if you want apps with
almost-isolated state, but if you want them to share state just add
single-interpreter = true

the doc repository is github.com/unbit/uwsgi-docs

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

Reply via email to