nginx reverse proxy for vibe tutorial
David
d at dav1d.de
Sun May 6 06:47:27 PDT 2012
Am 06.05.2012 03:00, schrieb James Miller:
> On Friday, 4 May 2012 at 11:54:04 UTC, David wrote:
>>> * using `try_files`, nginx complains that you can't use proxy_pass
>>> inside a named location (like `@vibe`), which means you can't use
>>> try_files to serve arbitrary static files, hence the massive list of
>>> extensions.
>>
>> why not doing:
>>
>>
>> root /path/to/static
>>
>> location / {
>> try_files $uri @app_proxy
>> }
>>
>> location @app_proxy {
>> ...
>> }
>
> I tried that, nginx complained endlessly about it. I'm not sure why and
> I would prefer to use that version.
>
> Also, I need to make an adjustment to my configuration, the
> $body_bytes_sent doesn't work the way I thought, so you actually need to do
>
> server {
> ...
> proxy_set_body $request_body;
> ...
> // Remove proxy_set_header Content-length... line
> }
Well this works perfectly for me (not with vibe, with gunicorn)
More information about the Digitalmars-d
mailing list