Re: (52) Empty reply from server

2016-05-10 Thread Pankaj Chaudhary
>You can read the headers_in data structure, and write the headers_out >data structure, as the examples show. I was able to write in headers_out data structure as i have shown my code already but i was not able to read from headers_in structure that is problem i am facing. I am looking solution fo

change client_body_buffer_size from 16K to 256K made the nginx logs size from 50M to 1G..

2016-05-10 Thread meteor8488
Hi Team, I always use below configuration to record the post date of my webserver (for security resaon) http { ... log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forward

Re: timeout with UWSGI?

2016-05-10 Thread Alex Hall
We may be finding the problem... I'm not sure what you mean by 'upstream service'. I know I have an upstream context for PHP, which defines the socket file to use, but I don't have that for UWSGI. The sample configurations I found never said to include one, and I don't have a deep enough grasp of h

Re: Replace apache with nginx

2016-05-10 Thread Francis Daly
On Thu, May 05, 2016 at 11:25:18AM +0300, Christian Ivanov wrote: Hi there, > Hello there. I want to migrate my website only on nginx. I setup > everything, but have issue with my htaccess. I'm not entirely sure of what specifically you are looking for here. Perhaps the secure link module (http

Re: (52) Empty reply from server

2016-05-10 Thread Francis Daly
On Mon, May 09, 2016 at 02:34:13PM +0530, Pankaj Chaudhary wrote: Hi there, > Its means nginx do not have any API as other server having to set header > and get header ? very strange ... You are correct. You've already shown code where you read headers sent by the client, and write headers sen

Re: Global denial for certain IPs or agents?

2016-05-10 Thread A. Schulze
you could also include one file at all relevant places. nginx.conf: server { # settings for server1 include /path/to/include.file; } server { # settings for server2 include /path/to/include.file; } /path/to/include.file: allow from ip1; allow from cidr2; deny all;

Re: timeout with UWSGI?

2016-05-10 Thread Francis Daly
On Tue, May 10, 2016 at 03:29:24PM -0400, Alex Hall wrote: Hi there, > Sometimes, by the time it does this, Nginx has given up on > it, so I see an IOError reported in the log because of a broken pipe. I'm > wondering how I can increase the timeout limit, to make Nginx wait longer > before closin

Re: Global denial for certain IPs or agents?

2016-05-10 Thread Francis Daly
On Tue, May 10, 2016 at 09:42:26AM -0400, Alex Hall wrote: Hi there, > I know how to do this, but how can I do it > globally? Currently I have to put the rules in each site's configuration > file, which is duplicating, which I'd like to avoid. http://nginx.org/r/allow says "Context: http, server

timeout with UWSGI?

2016-05-10 Thread Alex Hall
Hi all, My Flask app is finally up and running, using UWSGI! This is great, but I'm hitting a problem if the app takes too long. It talks to an AS400, so can sometimes take a while to gather the requested information, parse it, and hand back JSON. Sometimes, by the time it does this, Nginx has give

Re: php5-fpm gives unknown script error

2016-05-10 Thread Alex Hall
Just a note to say that I worked it out. I had my root set one level too deep, so the paths were rendering just fine but not matching up with where the root had them starting. Once I adjusted it, that problem went away. I'm still getting an error from OSTicket, but no longer am I seeing errors in m

Re: Nginx as reverse proxy scalability

2016-05-10 Thread Maxim Dounin
Hello! On Tue, May 10, 2016 at 05:37:55PM +0200, Artur wrote: > Thanks for your answer. > > Le 10/05/2016 à 17:04, Maxim Dounin a écrit : > > As long as you are using TCP/IP and have only one backend (ip + > > port), and only one local address on nginx side, then you are > > limited by the num

Re: Nginx as reverse proxy scalability

2016-05-10 Thread Artur
Le 10/05/2016 à 17:46, Maxim Konovalov a écrit : > The blog post I sent has nothing -plus specific in this area. That's perfect. Thank you all. -- Best regards, Artur. ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/ng

Re: Nginx as reverse proxy scalability

2016-05-10 Thread Maxim Konovalov
On 5/10/16 6:37 PM, Artur wrote: [...] >> - add more local addresses on nginx side and use proxy_bind to >> balance users between these addresses. > Yes, I've seen this, however I didn't catch how to dynamically > assign a value to proxy_bind from a pool of IP addresses in nginx > (not Nginx Plu

Re: Nginx as reverse proxy scalability

2016-05-10 Thread Valentin V. Bartenev
On Tuesday 10 May 2016 17:37:55 Artur wrote: > Thanks for your answer. > > Le 10/05/2016 à 17:04, Maxim Dounin a écrit : > > As long as you are using TCP/IP and have only one backend (ip + > > port), and only one local address on nginx side, then you are > > limited by the number of local ports

Re: Nginx as reverse proxy scalability

2016-05-10 Thread Artur
Thanks for your answer. Le 10/05/2016 à 17:04, Maxim Dounin a écrit : > As long as you are using TCP/IP and have only one backend (ip + > port), and only one local address on nginx side, then you are > limited by the number of local ports nginx can use. I currently have nginx running on the same

Re: Nginx as reverse proxy scalability

2016-05-10 Thread Maxim Konovalov
On 5/10/16 6:04 PM, Maxim Dounin wrote: > Hello! > > On Tue, May 10, 2016 at 12:26:59PM +0200, Artur wrote: > >> I'm currently working on nginx limits as a reverse proxy on a Debian box. >> My current setup is a nginx configured as a http/https web server (for >> static content) and a reverse pro

Re: SO_BINDTODEVICE

2016-05-10 Thread Ted Lemon
SO_BINDTODEVICE was originally put in to allow the DHCP server to tell on which interface a packet had arrived. I don't see any reason why it couldn't be used the way you describe, but I am under the impression that it is somewhat deprecated, and that may be why there was no action on that patch.

SO_BINDTODEVICE

2016-05-10 Thread Danomi Czaski
My device has multiple interfaces and supports dynamic ips. SO_BINDTODEVICE looks like it would be used to specify a device in the listen statement instead of having to update every IP change. I see someone submitted a patch years ago that wasn't accepted and there was no follow on. Is there any p

Re: HTTP2 window update and priority

2016-05-10 Thread Muhui Jiang
Hi To say more, I may need your comment on my understanding of Nginx 1. Is the reason that I cannot receive the response headers frame because the response headers are stored in the SSL buffer? 2.Nginx will fetch the blocked request in the queue when receiving a window update frame (is the reque

Re: Nginx as reverse proxy scalability

2016-05-10 Thread Maxim Dounin
Hello! On Tue, May 10, 2016 at 12:26:59PM +0200, Artur wrote: > I'm currently working on nginx limits as a reverse proxy on a Debian box. > My current setup is a nginx configured as a http/https web server (for > static content) and a reverse proxy for node.js processes on the same > server and i

Re: Range request with Accept-Encoding:“gzip,deflate" for *.pdf.* file-name pattern returns 416

2016-05-10 Thread Maxim Dounin
Hello! On Mon, May 09, 2016 at 08:39:31AM -0400, yogeshorai wrote: > We are facing this weird behavior wherein if a range request with > Accept-Encoding:“gzip,deflate" is called for a url having .pdf as part of > path, nginx would throw 416 even if the range is well within overall size of > sourc

Re: Global denial for certain IPs or agents?

2016-05-10 Thread mex
Hi Alex, you can do it that way or use something like this inside your server {} block: allow IP1; allow IP2; allow IP3; deny all; http://nginx.org/en/docs/http/ngx_http_access_module.html#allow Posted at Nginx Forum: https://forum.nginx.org/read.php?2,266738,266750#m

Re: HTTP2 window update and priority

2016-05-10 Thread Valentin V. Bartenev
On Tuesday 10 May 2016 22:12:59 Muhui Jiang wrote: > Hi > > >You've misread the source code. HTTP/2 windows are handled in > >ngx_http_v2_send_chain(), which is only called for response body > >data. > > when the window is blocked, Nginx logs that the headers frame has been sent > out, however I

Re: HTTP2 window update and priority

2016-05-10 Thread Muhui Jiang
Hi >You've misread the source code. HTTP/2 windows are handled in >ngx_http_v2_send_chain(), which is only called for response body >data. when the window is blocked, Nginx logs that the headers frame has been sent out, however I cannot receive any response headers. The same client tried on h2o

Re: Global denial for certain IPs or agents?

2016-05-10 Thread Alex Hall
Thanks. That page says that, to do the actual returning of the 4xx error, you must go go your site's configuration, not the global conf file. Am I reading that right? Is the easiest way to set my own variable in the main conf file, based on IP, then just do a check for that variable in each site's

Re: Global denial for certain IPs or agents?

2016-05-10 Thread mex
Hi Alex this might be an inspiration for your task: https://www.howtoforge.com/nginx-how-to-block-visitors-by-country-with-the-geoip-module-debian-ubuntu cheers, mex Posted at Nginx Forum: https://forum.nginx.org/read.php?2,266738,266739#msg-266739

Global denial for certain IPs or agents?

2016-05-10 Thread Alex Hall
Hi all, I've got Nginx on a Debian server, hosting two sites (two subdomains of my work's website). I want to limit both, and any future subdomains, to only intranet addresses. I also saw access logs this morning from a Chinese web spider which I want to block. I know how to do this, but how can I

Re: php5-fpm gives unknown script error

2016-05-10 Thread Alex Hall
On Tue, May 10, 2016 at 8:21 AM, Francis Daly wrote: > On Mon, May 09, 2016 at 05:52:47PM -0400, Alex Hall wrote: > > Hi there, > > without knowing anything about OSTicket... > > > FastCGI sent an stderr: unknown script while reading response header from > > upstream > > That usually means that t

Re: HTTP2 window update and priority

2016-05-10 Thread Valentin V. Bartenev
On Monday 09 May 2016 21:27:31 Muhui Jiang wrote: > Hi > > According to my view on the source code of Nginx 1.9.15, I noticed some > observation below: > > 1. when there is no enough window, nginx won't send back the response > frame, though according to the log, nginx said it has sent the header

Re: nginx 1.11.0: client sent stream with data before settings were acknowledged while processing HTTP/2 connection

2016-05-10 Thread Valentin V. Bartenev
On Tuesday 10 May 2016 04:55:30 locojohn wrote: > Valentin V. Bartenev Wrote: > --- > > > This issue should be reported to Safari. It appears that it doesn't > > handle refused streams. > > > > I'm going to make a workaround, but it will take t

Re: php5-fpm gives unknown script error

2016-05-10 Thread Francis Daly
On Mon, May 09, 2016 at 05:52:47PM -0400, Alex Hall wrote: Hi there, without knowing anything about OSTicket... > FastCGI sent an stderr: unknown script while reading response header from > upstream That usually means that the fastcgi server could not find the file that it was looking for, base

Nginx as reverse proxy scalability

2016-05-10 Thread Artur
Hello, I'm currently working on nginx limits as a reverse proxy on a Debian box. My current setup is a nginx configured as a http/https web server (for static content) and a reverse proxy for node.js processes on the same server and in future on other Debian boxes. I was unable to see (while readi

Re: nginx 1.11.0: client sent stream with data before settings were acknowledged while processing HTTP/2 connection

2016-05-10 Thread locojohn
Valentin V. Bartenev Wrote: --- > This issue should be reported to Safari. It appears that it doesn't > handle refused streams. > > I'm going to make a workaround, but it will take time. Just to clarify: this issue also affects Firefox 45. I