Log to a file inside a location block?

2016-04-23 Thread Thomas Nyberg
Hello, Is there any way to log to a file which location block is taken? I've had times when I've messed up regular expressions in location blocks and it was difficult to track down the issue. Is there any option equivalent to this pseudocode? location ~ ^/prepend(a|b) { logtofile "/prepend(a|

upstream max_fails/fail_timeout logic?

2016-01-30 Thread Thomas Nyberg
Hello I've set up an http proxy to a couple of other servers and am using max_fails and fail_time in addition to having a proxy_read_timeout to force failover in case of a read timeout. It seems to work fine, but I have two questions. 1) I'm not totally understanding the logic. I can tell that

Re: How to edit url and pass forward to wsgi?

2015-09-03 Thread Thomas Nyberg
nfo/cat`" it would make things much easier. Thanks for the help! On 09/03/2015 03:44 AM, Francis Daly wrote: On Thu, Sep 03, 2015 at 12:44:09AM -0400, Thomas Nyberg wrote: Hi there, location ~ /staging/dog/.*/info/cat { "~" means "regex match". You haven't

How to edit url and pass forward to wsgi?

2015-09-02 Thread Thomas Nyberg
Hello, If I have the following directive: location ~ /staging/dog/.*/info/cat { rewrite /staging/(.+) /$1 break; include uwsgi_params; uwsgi_pass 127.0.0.1:3130; } then a call to `http://127.0.0.1/staging/doc/v0.2/info/cat` gets passed through to my wsgi handler