Ah found the solution:
http://lists.unbit.it/pipermail/uwsgi/2010-July/000484.html

On Tue, Aug 10, 2010 at 6:01 PM, Weixi Yen <[email protected]> wrote:

> Thanks, turns out the SCRIPT_NAME /; is handled incorrectly.
>
> Running liveheaders, it appears that when redirect_to is used, then the
> request gets served as http://controller/action without the domain.
>
> I think it's appending "/" to another "/" to cause a double //
>
> No idea of a workaround though =/
>
>
>
> On Tue, Aug 10, 2010 at 3:26 PM, cd34 <[email protected]> wrote:
>
>> uwsgi runs as a daemon, and nginx talks to it.  uwsgi does some rather
>> aggressive caching which makes for a very fast pylons app.
>>
>> If I recall, I had problems with versions newer than 0.9.4.4, but,
>> haven't tried any later releases.  The command line I use is:
>>
>> /usr/src/uwsgi-0.9.4.4/uwsgi -d /tmp/uwsgi.log --uid 1000 --gid 1000 -
>> s /tmp/uwsgi.sock -C -iH /var/www/facebook/ --paste config:/var/www/
>> facebook/fbapp/production.ini
>>
>> And my application handles /
>>
>> The question is, what is redirecting incorrectly?
>>
>> I strip off /static/ and /fb/ and allow nginx to serve those:
>>
>>
>>    location ^~ /static/ {
>>        alias   /var/www/xxxxxx.com/static/;
>>    }
>>    location ^~ /fb/ {
>>        alias   /var/www/xxxxxx.com/fb/;
>>    }
>>    location / {
>>        uwsgi_pass  unix:/tmp/uwsgi.sock;
>>        include     uwsgi_params;
>>    }
>>
>> and I believe I added:
>>
>> uwsgi_param  SCRIPT_NAME        /;
>>
>> in uwsgi_params.
>>
>>
>> http://cd34.com/blog/programming/python/pylons-and-facebook-application-layout/
>> and
>> http://tonylandis.com/python/deployment-howt-pylons-nginx-and-uwsgi/
>>
>> detail it a bit more.
>>
>> I didn't have any problems using redirect_to which was used in a few
>> places.  Based on your description, it is possible SCRIPT_NAME is
>> missing which would give you urls like:
>> http://domain.com/physical/disk/path/controller/action
>>
>> If you can run something like livehttpheaders in firefox, or, even
>> something as basic as telnetting to nginx's port and doing a request
>> to see what the Location: header is, it might be a little easier to
>> troubleshoot it.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "pylons-discuss" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected]<pylons-discuss%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/pylons-discuss?hl=en.
>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to