Re: proxy_cache and X-Accel-Redirect

2017-06-26 Thread Igor A. Ippolitov
Hello, deivid__ As you are using uwsgi_pass, you may want to try uwsgi_cache (nginx.org/r/uwsgi_cache), uwsgi_cache_path and uwsgi_cache_key directives. To make use of $upstream_status you should move your upstream to a separate block like: upstream backend1 { server unix:///tmp/backend.so

Re: proxy_cache and X-Accel-Redirect

2017-06-26 Thread Francis Daly
On Mon, Jun 26, 2017 at 01:39:45PM -0400, deivid__ wrote: Hi there, > /data/asd-asd-asd -> proxied to a backend -> resolves to file.xls > /data/qqq-qqq-qqq -> proxied to a backend -> resolves to file.xls > /data/123-123-123 -> proxied to a backend -> resolves to image.jpeg The config at the remo

Re: Help! 503 Service Temporarily Unavailable when trying to reverse-proxy wordpress

2017-06-26 Thread Francis Daly
On Mon, Jun 26, 2017 at 06:24:50PM +0100, Fabrice Triboix wrote: Hi there, > I looked again at the requests from the browser (chrome), and I can > see something peculiar: the requests for "/" and "/favicon.ico" have > a header "Host: incise.co"; however the other requests have a header > "Host: 9

Re: proxy_cache and X-Accel-Redirect

2017-06-26 Thread Peter Booth
I've found that the easiest , most accurate way of diagnosing cache related issues is to use the incredible rebot.org service. If you can point redbot at your nginx, and also at your back end, it will identify anything that prevenst the resource being cacehable. If your website isnt visible fro

proxy_cache and X-Accel-Redirect

2017-06-26 Thread deivid__
Hi, I currently get requests that are resolved with an external server to a file with X-Accel-Redirect: for example: /data/asd-asd-asd -> proxied to a backend -> resolves to file.xls /data/qqq-qqq-qqq -> proxied to a backend -> resolves to file.xls /data/123-123-123 -> proxied to a backend -> res

Re: Help! 503 Service Temporarily Unavailable when trying to reverse-proxy wordpress

2017-06-26 Thread Fabrice Triboix
Hi Francis, Thanks a lot for spotting that! I redirected the log for that one to an `access503.log` file, and indeed I can see requests are sent there. I looked again at the requests from the browser (chrome), and I can see something peculiar: the requests for "/" and "/favicon.ico" have a h

Re: Help! 503 Service Temporarily Unavailable when trying to reverse-proxy wordpress

2017-06-26 Thread Francis Daly
On Mon, Jun 26, 2017 at 12:37:46PM +0100, Fabrice Triboix wrote: Hi there, > The problem I am having is that when accessing the home page (which > is about 50k of html alone), nginx responds with "503 Service > Temporarily Unavailable" responses. You have a separate server{} block that does "ret

Re: How do I exclude one folder from a try_files?

2017-06-26 Thread Francis Daly
On Sun, Jun 25, 2017 at 04:36:50PM -0400, Joergi wrote: Hi there, > location ^~ /wiki/images { > # Separate location for /wiki/images > root /home/wiki/www; > } > > This is all I needed. Good that you have an answer that works for you; thanks for confirming that. > I thought the r

"Client closed connection" when using nginx on Windows

2017-06-26 Thread tima_121
As part of a project I'm working on, I've been using nginx on Linux systems for a while. Currently I'm trying to run it on a Windows system. When I send a request to nginx (using a browser) it fails, and I get this error message in the error log: 2017/06/26 14:15:56 [info] 34092#16900: *1 client c

Help! 503 Service Temporarily Unavailable when trying to reverse-proxy wordpress

2017-06-26 Thread Fabrice Triboix
Hello, I am trying to use nginx to reverse-proxy a wordpress website. The wordpress website works fine when being accessed without nginx in the middle. The problem I am having is that when accessing the home page (which is about 50k of html alone), nginx responds with "503 Service Temporaril

$request_id not logged in the nginx logs

2017-06-26 Thread Georgi Georgiev
Hello, I have enabled request_id headers in nginx (which works as reverse proxy) by the following way: In nginx.co nf my log format hs included $request_id as follows: log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $bo