On Sunday, 6 May 2012 at 13:47:27 UTC, David wrote:
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)

I thought it should work, and I'm probably missing something, but here:

nginx: [emerg] "proxy_pass" cannot have URI part in location given by regular expression, or inside named location, or inside "if" statement, or inside "limit_except" block in /etc/nginx/conf/nginx.conf:87
nginx: configuration file /etc/nginx/conf/nginx.conf test failed

Thats what I get at the "Checking configuration stage".

For the record, using a named section works perfectly for my php configuration section, so I'm wondering if its something to with proxy_pass?

--
James Miller

Reply via email to