Re: session persistance with IP hash

2016-07-27 Thread Robert Paprocki
> > > I'm not as concerned with what server its routed to as much as I am > concerned with the client session "sticking" to the server it was routed > to. And I really do not know enough about how to use cookie based hashing. > In order to have cookie bashed hashing would the cookie need to be comm

Re: session persistance with IP hash

2016-07-27 Thread Brian Pugh
Reinis Rozitis said: The problem with this (if it matters) is that there is no (pre)defined value of the cookie BACKEND which would specifically route particular client to particular backend - I mean for example if you use values 'backend1', 'backend2', 'backend3' the hashed keys might (or not) asw

Re: session persistance with IP hash

2016-07-27 Thread Reinis Rozitis
Took a look at the link, but I have no idea what that would look like in my upstream stanza. Can you provide an example of what that would look like if I had 3 different backend servers and wanted to ensure that my hash was based on a cookie, or based on just a hash that provided a different ba

Re: session persistance with IP hash

2016-07-27 Thread Brian Pugh
Reinis Rozitis said: Yes, you can use different hash mechanisms/keys (for example specific cookies etc): https://nginx.org/en/docs/stream/ngx_stream_upstream_module.html#hash There are also some third-party sticky cookie modules. Took a look at the link, but I have no idea what that would look li

Re: session persistance with IP hash

2016-07-27 Thread Reinis Rozitis
My understanding is that the ip_hash directive is responsible for session persistence. My questions are: 1) How long does it last? For example, if I connect and my ip hash tells nginx to connect to backend3, will my source IP be forever tied to backend 3? If your IP doesn't change and all the

Re: session persistance with IP hash

2016-07-27 Thread Robert Paprocki
Hello, On Wed, Jul 27, 2016 at 1:21 PM, Brian Pugh wrote: > Running nginx free version 1.10.1-1.el6.ngx.x86_64 on RHEL 6.7. In my conf > I am using > > http { > upstream backend { > # Use ip hash for session persistance > *ip_hash;* > server backend1:80; > ser

session persistance with IP hash

2016-07-27 Thread Brian Pugh
Running nginx free version 1.10.1-1.el6.ngx.x86_64 on RHEL 6.7. In my conf I am using http { upstream backend { # Use ip hash for session persistance *ip_hash;* server backend1:80; server backend2:80; server backend3:80; } My understanding is that the

Re: NGINX and Lumen (Laravel) 5

2016-07-27 Thread Reinis Rozitis
Will consider it, but as menitoned above, making laravel "the" site is not appropriate for my context. Because of how nginx locations work (only one gets chosen for a request) running several applications under one virtualserver/domain can sometimes be challenging. Also because the laravel/l

Re: nginx not forwarding requests to backend servers.

2016-07-27 Thread Reinis Rozitis
Is this a feature I can get without having to purchase nginx plus? Yes, it's also mentioned in the article ".. or the latest NGINX Open Source compiled .." Afaik there are no extra nginx+ features in the proxy module, the upstream has dynamic backend and healthchecks in the commercial subsc

Re: nginx not forwarding requests to backend servers.

2016-07-27 Thread Brian Pugh
Reinis Rozitis said: Also for secure backend connection you should enable proxy_ssl. Reading https://www.nginx.com/resources/admin-guide/nginx-tcp-ssl-upstreams/ should probably be a good start. = Is this a feature I can get without having to purchase nginx p

Re: nginx not forwarding requests to backend servers.

2016-07-27 Thread Brian Pugh
Ok. I was able to get it working by changing this: proxy_pass http://ssl_myapplicationsite.net ; to this: proxy_pass *https*://ssl_myapplicationsite.net ; On Wed, Jul 27, 2016 at 12:07 PM, Brian Pugh wrote: > Stil

Re: NGINX and Lumen (Laravel) 5

2016-07-27 Thread Ben
On 27/07/2016 17:39, Reinis Rozitis wrote: You could try to use the alias instead of root then ( http://nginx.org/en/docs/http/ngx_http_core_module.html#alias ). I will take a look at that link. Thank you. In my mind though you're making it complicated. Perhaps I should clarify conte

Re: nginx not forwarding requests to backend servers.

2016-07-27 Thread Brian Pugh
Still not working. Logs show: 2016/07/27 11:59:35 [warn] 28038#28038: *3 upstream server temporarily disabled while reading response header from upstream, client: 192.168.254.202, server: myapplicationsite.net, request: "GET / HTTP/1.1", upstream: *"http://192.168.155.120:443/

Re: NGINX and Lumen (Laravel) 5

2016-07-27 Thread Reinis Rozitis
It exists all the way up to /public/, but NGINX seems to be adding the /lumen/ bit, which I guess is because of "location /lumen", but I'm not too sure how to go about telling it not to add the the location path as a suffix. You could try to use the alias instead of root then ( http://nginx.o

Re: NGINX and Lumen (Laravel) 5

2016-07-27 Thread Ben
On 27/07/2016 16:07, Francis Daly wrote: 405 is usually "Method Not Allowed", such as when you try to POST to a file. But in this case, you do your own "return 405". POST was just an example, the config doesn't work with GET or anything else. What happens if the nginx user does ls -l "

Re: NGINX and Lumen (Laravel) 5

2016-07-27 Thread Ben
On 27/07/2016 15:50, Reinis Rozitis wrote: Which translates to the following error.log entry : stat() "/usr/share/path/to/my/lumen/public/directory//public/lumen/" failed (13: Permission denied), client: 192.168.121.10, server: my.example.com, request: "POST /lumen/ HTTP/1.1", host: "my.exam

Re: nginx not forwarding requests to backend servers.

2016-07-27 Thread Reinis Rozitis
: "myapplicationsite.net" 2016/07/27 10:54:05 [warn] 27491#27491: *3 upstream server temporarily disabled while connecting to upstream, client: 192.168.254.202, server: myapplicationsite.net, request: "GET / HTTP/1.1", upstream: "http://192.168.155.120:80/";, host: "myapplicationsite.net" Why

Re: nginx not forwarding requests to backend servers.

2016-07-27 Thread crasyangel
u.default_port = 80; in ngx_http_upstream_server add a new upstream upstream ssl_myappliationsite.net { ip_hash; server backendappsite1.net:443; server backendappsite2.net:443; server backendappsite3.net:443; } server { listen 443 ssl; server_name myapplicationsite.net; keepalive_timeout 70; s

Re: nginx not forwarding requests to backend servers.

2016-07-27 Thread Brian Pugh
Ok. This looks like progress. However it still fails. Here is my config as it stands now. in nginx.conf: http { upstream myappliationsite.net { ip_hash; server backendappsite1.net; server backendappsite2.net; server backendappsite3.net; } In default.conf: serve

Re: nginx not forwarding requests to backend servers.

2016-07-27 Thread Reinis Rozitis
Can anyone give me an example config of what it would look like in both nginx.conf and default.conf using the names/info I have provided? It seems you have taken the default configuration example but if you use nginx as a balancer without serving any .php (or other) files you actually don't ne

Re: nginx not forwarding requests to backend servers.

2016-07-27 Thread Brian Pugh
What request do you make of nginx? Requests come into nginx as https://myapplicationsite.net"; On the actual backend server, that request is then redirected to: https://myapplicationsite.net//app/service/login?url=%2Fl That brings up the login page on the backend server. Which of your defined

Re: NGINX and Lumen (Laravel) 5

2016-07-27 Thread Francis Daly
On Wed, Jul 27, 2016 at 02:43:32PM +0100, Ben wrote: Hi there, > At the moment, the best I can get NGINX to give me is 405 errors. 405 is usually "Method Not Allowed", such as when you try to POST to a file. But in this case, you do your own "return 405". > Which translates to the following er

Re: NGINX and Lumen (Laravel) 5

2016-07-27 Thread Reinis Rozitis
Which translates to the following error.log entry : stat() "/usr/share/path/to/my/lumen/public/directory//public/lumen/" failed (13: Permission denied), client: 192.168.121.10, server: my.example.com, request: "POST /lumen/ HTTP/1.1", host: "my.example.com" Does the nginx user have read pe

Re: nginx not forwarding requests to backend servers.

2016-07-27 Thread Francis Daly
On Wed, Jul 27, 2016 at 07:33:31AM -0500, Brian Pugh wrote: Hi there, > I am using nginx as a load balancer. However when I type in the URL for my > site, which resolves to the IP of the load balancer, I get the default > nginx page saying "nginx has been setup more configuration is required". I

Re: nginx not forwarding requests to backend servers.

2016-07-27 Thread crasyangel
don't get it. proxy_set_header host? upstream name only for lookup upstream, it has no business with any proxy headers Posted at Nginx Forum: https://forum.nginx.org/read.php?2,268548,268552#msg-268552 ___ nginx mailing list nginx@nginx.org http://ma

Re: nginx not forwarding requests to backend servers.

2016-07-27 Thread Brian Pugh
nginx-1.10.1-1.el6.ngx.x86_64 on RHEL 6. What do you mean by rename the upstream? I thought if my backend applications are listening for requests on https://myapplicationsite.net then thats what the upstream server needs to be defined as in nginx? If I do rename and my backend server listen on http

Re: nginx not forwarding requests to backend servers.

2016-07-27 Thread crasyangel
test ok with nginx 1.8.0,which nginx version you use? nginx must be confused by same domain name and upstream name, rename the upstream name! Posted at Nginx Forum: https://forum.nginx.org/read.php?2,268548,268550#msg-268550 ___ nginx mailing list ngin

NGINX and Lumen (Laravel) 5

2016-07-27 Thread Ben
Hi, I'm having a frustrating time trying to get Lumen (a.k.a Laravel) working on my NGINX install. At the moment, the best I can get NGINX to give me is 405 errors. Which translates to the following error.log entry : stat() "/usr/share/path/to/my/lumen/public/directory//public/lumen/" fa

nginx not forwarding requests to backend servers.

2016-07-27 Thread Brian Pugh
I am posting this again because a copy never appeared in my inbox. Please ignore if it was actually delivered to the group already. I am using nginx as a load balancer. However when I type in the URL for my site, which resolves to the IP of the load balancer, I get the default nginx page saying "n

nginx not forwarding requests to backend servers.

2016-07-27 Thread Brian Pugh
I am using nginx as a load balancer. However when I type in the URL for my site, which resolves to the IP of the load balancer, I get the default nginx page saying "nginx has been setup more configuration is required". I would expect nginx to forward my request through to the backend servers I have

Re: When nginx support tcp splicing?

2016-07-27 Thread Aleksandar Lazic
Hi. Am 27-07-2016 10:34, schrieb baidu: Do have any plan for tcp splicing? This was asked in the past http://mailman.nginx.org/pipermail/nginx/2015-December/thread.html#49398 Best regards Aleks ___ nginx mailing list nginx@nginx.org http://mailma

Re: proxy_next_upstream http_404?

2016-07-27 Thread mevans336
I figured out what it was. I had an error_page directive in another location block in the same server.conf that was apparently overriding the proxy_next_upstream. I commented it out and now the upstream throwing the 404 is being skipped. I'm just going to remove 404 from the error_page directive.

When nginx support tcp splicing?

2016-07-27 Thread baidu
Do have any plan for tcp splicing?___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

Re: epoll_wait() reported that client prematurely closed connection, so upstream connection is closed too while sending request to upstream

2016-07-27 Thread crasyangel
I guess the response header has wrong with chrome, post the entire response header, and check again Posted at Nginx Forum: https://forum.nginx.org/read.php?2,258050,268539#msg-268539 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailm

Re: proxy_next_upstream http_404?

2016-07-27 Thread crasyangel
show your upstream and proxy full config Posted at Nginx Forum: https://forum.nginx.org/read.php?2,268529,268537#msg-268537 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx