This may well help: https://www.nginx.com/blog/overcoming-ephemeral-port-exhaustion-nginx-plus/ On 10/04/2018 13:54, Salikhov Dinislam wrote: > Hello, > > On Linux, NINGX can have more than 65K connections to backends per one local > address of a proxy (set via proxy_bind), as Linux support > IP_BIND_ADDRESS_NO_PORT socket option. > > I wonder if it is possible to have more tby steveh - Nginx Mailing List - English
We're seeing an 502 bad gateway responses to client on an nginx load balanced upstream due to "no live upstreams". The upstream in question has 2 servers defined with default settings running over https (proxy_pass https://myupstream). When this happens we see "no live upstreams while connecting to upstream" in the nginx error log and just prior to this: "peer closedby steveh - Nginx Mailing List - English
My guess would be that your app is redirecting back to the slash urls Your could test this with a directory on the webserver that has a matching index file. Alternatively point a browser at the upstream and check for redirects directly On 28/04/2017 17:52, Alex Med wrote: > Steven - > > I implemented your suggestion and I still get the same problem with the > directories ... for aby steveh - Nginx Mailing List - English
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 thanks! > > Alex > > Posted at Nginx Forum: httpsby steveh - Nginx Mailing List - English
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://xxxx:xportNumber; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_connect_timeout 600; proxy_send_timeout 600by steveh - Nginx Mailing List - English
If is evil https://www.nginx.com/resources/wiki/start/topics/depth/ifisevil/ 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 rid of the trailing slashes for directories. I > have used the following to get ridby steveh - Nginx Mailing List - English
On 05/12/2016 17:12, Maxim Dounin wrote: > Hello! > > On Mon, Dec 05, 2016 at 02:40:27PM +0000, Steven Hartland wrote: > >> On 05/12/2016 13:27, Maxim Dounin wrote: >>> Hello! >>> >>> On Sun, Dec 04, 2016 at 09:39:59PM +0000, Steven Hartland wrote: > [...] > >>>> I believe the change to add a localhost bind to the server in question &gby steveh - Nginx Mailing List - English
I believe you want proxy_ignore_client_abort on to achieve that. On 12/01/2017 19:23, Jonathan Geyser wrote: > Richard, > > On further investigation -- it looks like the client was closing the > front-end connection. I need the back-end socket to remain open > regardless of what the front-end is doing. Is there a way to > accomplish this? > > Thanks in advance, > Jonby steveh - Nginx Mailing List - English
On 05/12/2016 17:12, Maxim Dounin wrote: > Hello! > > On Mon, Dec 05, 2016 at 02:40:27PM +0000, Steven Hartland wrote: snip... > Given that the real local address of the listening socket as shown > by netstat is 10.10.96.146, it means that the socket was created > when there were no explicit 127.0.0.1 in the jail. This didn't appear to be the case as nginx was restarted after thby steveh - Nginx Mailing List - English
Cool thanks for this. Looks like on http://nginx.org/en/docs/njs_about.html you have a typo on the second line "nignScript" I assume you meant nginScript ;-) On 05/12/2016 15:26, Igor Sysoev wrote: > Hi! > > We have made recently documentation for nginScript: > > http://nginx.org/en/docs/http/ngx_http_js_module.html > http://nginx.org/en/docs/stream/ngx_stream_js_modby steveh - Nginx Development
On 05/12/2016 13:27, Maxim Dounin wrote: > Hello! > > On Sun, Dec 04, 2016 at 09:39:59PM +0000, Steven Hartland wrote: > >> We've used nginx for years and never had an issue with nginx upgrade >> until today where the upgrade command ran but almost instantly after the >> new process exited. >> >> /usr/local/etc/rc.d/nginx upgrade >> Performing sanityby steveh - Nginx Mailing List - English
We've used nginx for years and never had an issue with nginx upgrade until today where the upgrade command ran but almost instantly after the new process exited. /usr/local/etc/rc.d/nginx upgrade Performing sanity check on nginx configuration: nginx: the configuration file /usr/local/etc/nginx/nginx.conf syntax is ok nginx: configuration file /usr/local/etc/nginx/nginx.conf test is successful Uby steveh - Nginx Mailing List - English
On 19/10/2015 18:57, Maxim Dounin wrote: > Hello! > > On Fri, Oct 16, 2015 at 06:24:11PM +0100, Steven Hartland wrote: > >> On 16/10/2015 13:05, Maxim Dounin wrote: >>> Hello! >>> >>> On Fri, Oct 16, 2015 at 12:09:49AM +0000, Steven Hartland wrote: >>> >>>> # HG changeset patch >>>> # User Steven Hartland <steven.hartby steveh - Nginx Development
On 19/10/2015 17:59, Maxim Dounin wrote: > Hello! > > On Fri, Oct 16, 2015 at 06:15:30PM +0100, Steven Hartland wrote: > >> On 16/10/2015 13:20, Maxim Dounin wrote: >>> Hello! >>> >>> On Fri, Oct 16, 2015 at 02:36:13AM +0100, Steven Hartland wrote: >>> >>>> I'm making changes to a filter module and when it detected an error it >&by steveh - Nginx Development
On 16/10/2015 13:05, Maxim Dounin wrote: > Hello! > > On Fri, Oct 16, 2015 at 12:09:49AM +0000, Steven Hartland wrote: > >> # HG changeset patch >> # User Steven Hartland <steven.hartland@multiplay.co.uk> >> # Date 1444954080 0 >> # Fri Oct 16 00:08:00 2015 +0000 >> # Node ID c22d8299e7040e0de6f85b4e96d0dd953f7af644 >> # Parent 78b4e12e6eby steveh - Nginx Development
On 16/10/2015 13:20, Maxim Dounin wrote: > Hello! > > On Fri, Oct 16, 2015 at 02:36:13AM +0100, Steven Hartland wrote: > >> I'm making changes to a filter module and when it detected an error it >> returned NGX_ERROR however the response generated to the client isn't >> the expected 500 internal server error I would have expected given said >> return. >> &by steveh - Nginx Development
After doing some more digging is seems a better manual call would be: return ngx_http_filter_finalize_request(r, &module, NGX_HTTP_INTERNAL_SERVER_ERROR); But it still leaves the question is it ever sensible to allow bad responses to be returned to the client in the case NGX_ERROR is returned from a filter? On 16/10/2015 02:36, Steven Hartland wrote: > I'm making changes to a filter moby steveh - Nginx Development
I'm making changes to a filter module and when it detected an error it returned NGX_ERROR however the response generated to the client isn't the expected 500 internal server error I would have expected given said return. So the question is do filters have to manually call ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); or is it expected that the upper layers should actually do the rby steveh - Nginx Development
# HG changeset patch # User Steven Hartland <steven.hartland@multiplay.co.uk> # Date 1444954080 0 # Fri Oct 16 00:08:00 2015 +0000 # Node ID c22d8299e7040e0de6f85b4e96d0dd953f7af644 # Parent 78b4e12e6efe642aff591234db0f0b040cae9b5e Support FreeBSD jails for testing Ensure the test directory is read and writable to the test user. If you request 127.0.0.1 in a FreeBSD jail without specby steveh - Nginx Development
On 01/09/2015 06:58, Yichun Zhang (agentzh) wrote: > Hello! > > On Tue, Sep 1, 2015 at 4:29 AM, Valentin Bartenev wrote: >> #define NGX_HTTP_MAX_URI_CHANGES 10 >> -#define NGX_HTTP_MAX_SUBREQUESTS 200 >> +#define NGX_HTTP_MAX_SUBREQUESTS 50 >> > Hmm, this change makes me sad. In our ngx_lua module, for example, we > allow progrby steveh - Nginx Development
If you want to just pass the header through and not process it you can use proxy_pass_header. We do just this to pass X-Accel-Redirect though from server1 -> server2 where its then processed. e.g. proxy_pass_header X-Accel-Redirect Hope this helps. Regards Steve On 19/12/2014 06:52, Toshikuni Fukaya wrote: > Hi, > > I have some questions for X-Accel-Redirect. > > Bby steveh - Nginx Development
First off thanks for reviewing, comments / questions inline below On 05/12/2014 16:00, Maxim Dounin wrote: > Hello! > > On Thu, Dec 04, 2014 at 09:07:57PM +0000, Steven Hartland wrote: > >> # HG changeset patch >> # User Steven Hartland <steven.hartland@multiplay.co.uk> >> # Date 1417727204 0 >> # Thu Dec 04 21:06:44 2014 +0000 >> # Node ID 05dby steveh - Nginx Development
This time test suite passes on default compile: All tests successful. Files=141, Tests=964, 86 wallclock secs ( 0.49 usr 0.22 sys + 10.05 cusr 2.55 csys = 13.31 CPU) Result: PASS On 04/12/2014 21:07, Steven Hartland wrote: > # HG changeset patch > # User Steven Hartland <steven.hartland@multiplay.co.uk> > # Date 1417727204 0 > # Thu Dec 04 21:06:44 2014 +0000 > # Nodeby steveh - Nginx Development
# HG changeset patch # User Steven Hartland <steven.hartland@multiplay.co.uk> # Date 1417727204 0 # Thu Dec 04 21:06:44 2014 +0000 # Node ID 05d3973ece9af030d0312932938fc3d1f2f139dd # Parent 1573fc7875fa09ee55763ce7ddc4e98d61e1deaf Allow Partial Content responses to satisfy Range requests diff -r 1573fc7875fa -r 05d3973ece9a src/http/modules/ngx_http_range_filter_module.c --- a/src/htby steveh - Nginx Development
On 04/12/2014 19:37, Maxim Dounin wrote: > Hello! > > On Tue, Nov 25, 2014 at 02:22:13PM +0000, Steven Hartland wrote: > >> # HG changeset patch >> # User Steven Hartland <steven.hartland@multiplay.co.uk> >> # Date 1416925134 0 >> # Tue Nov 25 14:18:54 2014 +0000 >> # Node ID 0c3c06fabfc3b1c57710c0cced4837c10e3e9bbb >> # Parent 7d7eac6e31by steveh - Nginx Development
Sent this one a while back but never had any feedback so updating to latest code base and resending. Previously only 200 responses could satisfy Range requests, this adds support for 206 responses (Partial Content) to also satisfy Range requests as long as the Range fits within the Partial Content. This can be used directly as well as by other modules where it can be used to build more complby steveh - Nginx Development
# HG changeset patch # User Steven Hartland <steven.hartland@multiplay.co.uk> # Date 1416925134 0 # Tue Nov 25 14:18:54 2014 +0000 # Node ID 0c3c06fabfc3b1c57710c0cced4837c10e3e9bbb # Parent 7d7eac6e31df1d962a644f8093c1fbb8f91620ce Allow Partial Content responses to satisfy Range requests. diff -r 7d7eac6e31df -r 0c3c06fabfc3 src/http/modules/ngx_http_range_filter_module.c --- a/src/hby steveh - Nginx Development
We use 206 cached responses. On 23/11/2014 11:45, Piotr Sikora wrote: > Hey Maxim, > >> For example, it can be usable with 206 responses as well (and this >> is perfectly allowed by the RFC). > 206 responses won't be cached by nginx, so that's kind of a moot point. > >> I still think this approach is wrong, the behaviour shouldn't >> depend on the status code.by steveh - Nginx Development
For file logging it supports buffering see the docs here: http://nginx.org/en/docs/http/ngx_http_log_module.html#access_log On 11/11/2014 12:37, Alexander Todorov wrote: > Hi guys, > I've seen some reports on the web claiming nginx can serve in the > order of 10000 > requests per second (correct me if I'm wrong). > > I also see that logging to syslog is supported. > > Isby steveh - Nginx Development
# HG changeset patch # User Steven Hartland <steven.hartland@multiplay.co.uk> # Date 1409611936 0 # Mon Sep 01 22:52:16 2014 +0000 # Node ID 0dc608b347e24b914ee193214857de15aad2ac0b # Parent 3f5f0ab59b359064db16e1aa52dfca335720dff6 Allow Partial Content responses to satisfy Range requests. Previously on 200 responsed could statisfy Range requests, this adds support for 206 responses (by steveh - Nginx Development