Re: More than 65K connections of a proxy on FreeBSD

2018-04-10 Thread Steven Hartland
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_ADD

Peer closed connection in SSL handshake marking upstream as failed

2017-06-21 Thread Steven Hartland
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 connect

Re: Trailing Slash Redirect Loop Help

2017-05-01 Thread Steven Hartland
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 imple

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 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 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

Re: nginx upgrade fails due bind error on 127.0.0.1 in a FreeBSD jail

2017-03-31 Thread Steven Hartland
On 05/12/2016 17:12, Maxim Dounin wrote: Hello! On Mon, Dec 05, 2016 at 02:40:27PM +, Steven Hartland wrote: On 05/12/2016 13:27, Maxim Dounin wrote: Hello! On Sun, Dec 04, 2016 at 09:39:59PM +, Steven Hartland wrote: [...] I believe the change to add a localhost bind to the

Re: Nginx not honoring keepalive / multiple requests to http backend over single TCP session

2017-01-12 Thread Steven Hartland
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.

Re: nginx upgrade fails due bind error on 127.0.0.1 in a FreeBSD jail

2016-12-05 Thread Steven Hartland
On 05/12/2016 17:12, Maxim Dounin wrote: Hello! On Mon, Dec 05, 2016 at 02:40:27PM +, 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

Re: nginx upgrade fails due bind error on 127.0.0.1 in a FreeBSD jail

2016-12-05 Thread Steven Hartland
On 05/12/2016 13:27, Maxim Dounin wrote: Hello! On Sun, Dec 04, 2016 at 09:39:59PM +, 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/loca

nginx upgrade fails due bind error on 127.0.0.1 in a FreeBSD jail

2016-12-04 Thread Steven Hartland
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/