Http proxy module

2017-04-28 Thread Roman Pastushkov via nginx
Hello everyone! i am trying to build nginx with proxy module from sources ./configure --prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/ nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/acces s.l

Re: Trailing Slash Redirect Loop Help

2017-04-28 Thread Alex Med
Steven - I implemented your suggestion and I still get the same problem with the directories ... for anything else it works. But when I try to access a directory ... I can see on the browser address bar the / appearing and disappearing and then it finally does but the browser gives this error: To

Re: Trailing Slash Redirect Loop Help

2017-04-28 Thread Steven Hartland
Yep. On 28/04/2017 16:43, Alex Med wrote: Steve - Thank you so much this has brought so much clarity! I appreciate the time you spend writing the reply. So the rewrite ^/(.*)/$ /$1 permanent; needs to be outside of the location definition and inside the server definition, correct? Infinite

Re: Trailing Slash Redirect Loop Help

2017-04-28 Thread Alex Med
Steve - Thank you so much this has brought so much clarity! I appreciate the time you spend writing the reply. So the rewrite ^/(.*)/$ /$1 permanent; needs to be outside of the location definition and inside the server definition, correct? Infinite thanks! Alex Posted at Nginx Forum: https:

Re: Trailing Slash Redirect Loop Help

2017-04-28 Thread Steven Hartland
If I understand what you're trying to do correctly, then I think you want something like: # Ensure no tailing slashes rewrite ^/(.*)/$ /$1 permanent; location @upstream { proxy_pass https://:xportNumber; proxy_set_header Host $host; proxy_set_header X-Real-IP $remo

Re: Trailing Slash Redirect Loop Help

2017-04-28 Thread Alex Med
Steveh: Thank you for your reply. So what you are suggesting me to do is something like this: location / { try_files $uri $uri/ @rewrite; } location @rewrite { rewrite ^/(.*)/$ /$1 permanent; } Put try files inside the location block and create a new block with the rewrite? Thank you

Re: Trailing Slash Redirect Loop Help

2017-04-28 Thread Steven Hartland
If is evil I'd suggest using try_files instead, which is typically something like: location / { try_files $uri $uri/ =404; } Regards Steve On 28/04/2017 15:27, Alex Med wrote: Hi, I am having an issue getting

Trailing Slash Redirect Loop Help

2017-04-28 Thread Alex Med
Hi, I am having an issue getting rid of the trailing slashes for directories. I have used the following to get rid off the trailing slash: #rewrite all URIs without any '.' in them that end with a '/' #rewrite ^([^.]*)/$ $1 permanent; & #rewrite all URIs that end with a '/'

Dynamic Upstream

2017-04-28 Thread bhargava
Pupose: Need to create a local proxy to an image cdn (Beats the purpose of having a CDN, but can't help!!) Setup: I have a cdn setup with multiple endpoints say t1.mycdn.com, t2.mycdn.com and t3.mycdn.com. I have a website (foobar.com) which uses images from these cdns. Because of some requirement

Re: Nginx reload process in detail

2017-04-28 Thread Francis Daly
On Thu, Apr 27, 2017 at 05:21:06AM -0400, shivramg94 wrote: Hi there, The rough description of the reload process is available by searching for "nginx control" or "nginx reload"; the exact details are available in the source. > In the Nginx documentation, it was mentioned that the older worker p

Re: How can I set a maximum limit for gzip module?

2017-04-28 Thread Zhang Chao
Hi t.nishiyori, Don’t worry, just like Ermilov said, when you enable the gzip module and nginx gets a part of response body, gzip module will try to compress the data, and if the buffers reach the limit, gzip module just send these compressed data firstly(ngx_http_gzip_body_filter), when processin

Re: How can I set a maximum limit for gzip module?

2017-04-28 Thread t.nishiyori
Hi tokers, > nginx compresses the body by “chunk” Thanks for explanation about gzip-module. So, there were no errors when upstream response size exceeds the gzip_buffers_size. But I think a lot of large responses exceed the prepared buffers, some day. Is there any possibility of such a problem? T

Re: How can I set a maximum limit for gzip module?

2017-04-28 Thread t.nishiyori
Hi, > When all buffers are filled, gzip filter just outputs another chunk of compressed data. Thanks for explanation about gzip-module. When all buffers are filled, how will the next data be handled? I think that either "wait for the buffer to be released and compressed by gzip filter" or "output