Re: $request_id not logged in the nginx logs

2017-06-27 Thread Georgi Georgiev
Thank you! It works now, but still only in response headers, not in request headers. Is it normal behavior? Also how can I append the ID in the logs? I think that it should works by this way by default? > On Jun 28, 2017, at 9:52 AM, Liu Lantao wrote: > > Please try to append ‘always' at the

Re: $request_id not logged in the nginx logs

2017-06-27 Thread Liu Lantao
Please try to append ‘always' at the end of ‘add_header’ line. http://nginx.org/en/docs/http/ngx_http_headers_module.html#add_header If the always parameter is specified (1.7.5), the header field will be added regardless of the response code. > On Jun 28, 2017, at 1:52 PM, Georgi Georgiev

Re: $request_id not logged in the nginx logs

2017-06-27 Thread Georgi Georgiev
Nobody use this variable? > On Jun 26, 2017, at 2:28 PM, Georgi Georgiev > wrote: > > 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

Proxy_cache_key based on custom header

2017-06-27 Thread deivid__
Hi. I'm trying to use 2 level proxying to cache files delivered with X-Accel-Redirect. This kinda works, the only thing missing is getting the cache_key to be the filename. If `proxy_cache` is unset (or set to the default), the caching mechanism "works": - Every request gets cached (good) - Diff

Re: build error for 1.13.2

2017-06-27 Thread Kevin Worthington
Thanks Maxim, it turned out my build script was just doing something strange. I got it built. Best regards, Kevin -- Kevin Worthington kworthington (At) {gmail] . com https://kevinworthington.com/ https://twitter.com/kworthington On Tue, Jun 27, 2017 at 1:26 PM, Maxim Dounin wrote: > Hello! > >

Re: proxy_cache and X-Accel-Redirect

2017-06-27 Thread deivid__
Real files on a slow filesystem. They'll never move / go away / change / whatever. Posted at Nginx Forum: https://forum.nginx.org/read.php?2,275138,275175#msg-275175 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

Re: build error for 1.13.2

2017-06-27 Thread Maxim Dounin
Hello! On Tue, Jun 27, 2017 at 11:45:12AM -0400, Kevin Worthington wrote: > On Cygwin 64-bit, I am getting this build error (worked fine on Cygwin > 32-bit) : As per the path in the make output: > make[1]: Leaving directory '/home/kevin.worthington/nginx-1.13.1' you are building nginx 1.13.1.

Re: proxy_cache and X-Accel-Redirect

2017-06-27 Thread Peter Booth
David, Are the backend resources actually dynamic / created on demand, or are they "real" files that exist on a slow file system? Peter Sent from my iPhone > On Jun 27, 2017, at 12:56 PM, deivid__ wrote: > > I mistakenly typed redirect to /nfs because it redirects to /converted which > has a

Re: proxy_cache and X-Accel-Redirect

2017-06-27 Thread deivid__
I mistakenly typed redirect to /nfs because it redirects to /converted which has an alias to /nfs. The files are delivered, my problem is that the cache is never populated, so following requests keep hitting the slow filesystem Posted at Nginx Forum: https://forum.nginx.org/read.php?2,275138,275

Re: Nginx 404 while accessing app

2017-06-27 Thread AjaySawant
Hey, I also would like to mention you that it works if I create a symbolic link of html folder inside /etc/nginx directory which points to /usr/share/nginx/html directory. The only concern is why is it picking up from /etc/nginx/html directory even though I did not mention anything about that direc

Re: Nginx 404 while accessing app

2017-06-27 Thread AjaySawant
Thanks Toker for replying. I implemented your suggestion as given below but it is not working. I am getting same error as earlier. I am not able to understand why nginx is taking the docroot as /etc/nginx/html instead of /usr/share/nginx/html. server { listen 80 default_server;

Re: proxy_cache and X-Accel-Redirect

2017-06-27 Thread Igor A. Ippolitov
David, In your configuration /converted is configured to be 'internal'. Your backend should redirect to /converted/file1.img (so it will be proxied and cached as configured...) If you there is no mistake and redirect differs from configured location then here is the trouble =) Could you plea

Re: proxy_cache and X-Accel-Redirect

2017-06-27 Thread deivid__
Igor: As I explained to francis ( https://forum.nginx.org/read.php?2,275138,275163#msg-275163 ), I don't want to cache what goes to uwsgi. I get a request for /v/example-uri, my back-end answers with X-accel-redirect: /nfs/file1.img (2gb). I want nginx to copy this to a local cache ( /cache/c/29/

build error for 1.13.2

2017-06-27 Thread Kevin Worthington
Hello! On Cygwin 64-bit, I am getting this build error (worked fine on Cygwin 32-bit) : -o objs/src/os/unix/ngx_udp_send.o \ src/os/unix/ngx_udp_send.c cc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -D FD_ SETSIZE=2048 -I src/core -I src/event -I src/eve

Re: proxy_cache and X-Accel-Redirect

2017-06-27 Thread deivid__
Francis, The /data root was an example, in my case it's /v/ What I want to do is: - get a request like /v/c85320d9ddb90c13f4a215f1f0a87b531ab33310 - proxy that to my back-end which tells nginx to serve a certain file (X-Accel-redirect). - I want to cache this file as the first access is expensiv

nginx-1.13.2

2017-06-27 Thread Maxim Dounin
Changes with nginx 1.13.227 Jun 2017 *) Change: nginx now returns 200 instead of 416 when a range starting with 0 is requested from an empty file. *) Feature: the "add_trailer" directive. Thanks to Piotr Sikora. *) Bugfix: nginx c

Re: Nginx 404 while accessing app

2017-06-27 Thread Zhang Chao
Hello! I copied your configuration, it seems a internal redirection cycled, you need to modify it(e.g. change the location / to location /=). After i modified, i didn’t reproduce your problem, the root directive works well. On 27 June 2017 at 22:36:45, AjaySawant (nginx-fo...@forum.nginx.org) wr

Re: Nginx 404 while accessing app

2017-06-27 Thread Zhang Chao
Hello! I copied your configuration, it seems a internal redirection cycled, you need to modify it(e.g. change the location / to location /=). After i modified, i didn’t reproduce your problem, the root directive works well. On 27 June 2017 at 22:36:45, AjaySawant (nginx-fo...@forum.nginx.org) wr

Nginx 404 while accessing app

2017-06-27 Thread AjaySawant
I have one AngularJS application deployed on port 8080. It can be access as http://ip:8080. Now I have deployed the application on nginx and I am trying to access this application via nginx reverse proxy configuration but I am getting 404 error in nginx log as it looks like the nginx is searching t

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

2017-06-27 Thread Fabrice Triboix
I finally found out the root cause of the problem. I initially installed wordpress by accessing the server directly using its IP address (when the DNS was not up and running yet). Apparently, wordpress decides to save that into its database and serves the links based on that... I deleted the w

rewrite in custom 404 location

2017-06-27 Thread Артём Томюк
is it possible to create "if" rule with rewrite action inside custom 404 location? the task is fallback to jpg if upstream returns 404 for .webp request. i've double-checked regexp's - they seems to be write location ~* \.(jpg|mp4|svg|jpeg|gif|png|css|bmp|js|swf|webp|jp2|ico)$ { etag on;

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

2017-06-27 Thread Fabrice Triboix
Hi Francis, You are right, most links in the wordpress html start with "http://92.222.75.87/..."; so that's the problem. I'll try to get that fixed. Many thanks for your help! Fabrice On 27/06/17 00:16, Francis Daly wrote: On Mon, Jun 26, 2017 at 06:24:50PM +0100, Fabrice Triboix wrote: