Re: block google app

2017-06-20 Thread lists
I want to block by referrer. I provided a more "normal" record so that the user agent and referrer location was obvious by context.  My problem is I'm not creating the match expression correctly. I've tried spaces, parens. I haven't tried quotes. ‎    Original Message   From: Robert Paprocki

Re: block google app

2017-06-20 Thread Robert Paprocki
Well what is your log format then? We can't possibly help you if we don't have the necessary info ;) Do you want to block based on http referer? Or user agent string? Or something else entirely? The config snippet you posted indicates you are trying to block by referer. If you want to block a

Re: block google app

2017-06-20 Thread li...@lazygranch.com
I think the ipad is the useragent. I wiped out that access.log, but here is a fresh one showing a browser (user agent) in the proper field. 200 76.20.227.211 - - [21/Jun/2017:00:48:45 +] "GET /images/photo.jpg HTTP/1.1" 91223 "http://www.mydomain.com/page.html; "Mozilla/5.0 (Linux; Android

Re: block google app

2017-06-20 Thread Robert Paprocki
Do you mean $http_user_agent? > On Jun 20, 2017, at 17:36, "li...@lazygranch.com" > wrote: > > I would like to block the google app from directly downloading images. > > access.log: > > 200 186.155.157.9 - - [20/Jun/2017:00:35:47 +] "GET /images/photo.jpg >

block google app

2017-06-20 Thread li...@lazygranch.com
I would like to block the google app from directly downloading images. access.log: 200 186.155.157.9 - - [20/Jun/2017:00:35:47 +] "GET /images/photo.jpg HTTP/1.1" 334052 "-" "com.google.GoogleMobile/28.0.0 iPad/9.3.5 hw/iPad2_5" "-" My nginx code in the images location: if

Re: [nginx] slice module issue

2017-06-20 Thread 洪志道
Wow, thank you for your patience. Perfect!!! Btw, The ctx of slice module is really a good skill. On Wed, Jun 21, 2017 at 2:43 AM, Roman Arutyunyan wrote: > Hi, > > Here's a simple configuration for your case. > > map $http_range $proxy_range { > volatile; >

Re: [nginx] slice module issue

2017-06-20 Thread Roman Arutyunyan
Hi, Here's a simple configuration for your case. map $http_range $proxy_range { volatile; ~, $http_range; default $slice_range; } server { listen 8000; location / { slice 100; proxy_set_header Range $proxy_range;

Re: Автоматическое увеличение sndbuf при EAGAIN

2017-06-20 Thread Maxim Dounin
Hello! On Tue, Jun 20, 2017 at 12:36:26PM -0400, Ilya Evseev wrote: > То есть получается, что лучше всего использовать только net.ipv4.tcp_wmem > и вообще никогда не указывать "listen ... sndbuf=..." в nginx.conf, > чтобы он не вызвал setsockopt и не отключал автонастройку в ядре? Если нужен

Re: [patch] Http image_filter: return 405 when method is HEAD andbodyis empty.

2017-06-20 Thread Maxim Dounin
Hello! On Wed, Jun 21, 2017 at 12:28:23AM +0800, 胡聪 (hucc) wrote: > Hi, > > On Tuesday, Jun 20, 2017 11:53 PM +0300, Maxim Dounin wrote: > > >> >On Tue, Jun 20, 2017 at 12:56:15AM +0800, 胡聪 (hucc) wrote: > >> > > >> >> Returning 415 does not conform to the HTTP protocol when image and > >> >>

Re: [nginx] slice module issue

2017-06-20 Thread 洪志道
I hope slice module can satisfy customer requirements. Now the key point is users want to control the behavior of slice. And this is common. Here's the patch, take a look please! diff -r 5e05118678af src/http/modules/ngx_http_slice_filter_module.c ---

Re: [nginx] slice module issue

2017-06-20 Thread 洪志道
Well, it's a good idea, but it's not satisfied yet. Now we assume users want to ignore the slice feature when the multi-range request is coming. How about let slice directive support if scope? Such as the following. map $http_range $need_slice { ... } map $slice_range $x_slice_range {

Re: Автоматическое увеличение sndbuf при EAGAIN

2017-06-20 Thread Ilya Evseev
То есть получается, что лучше всего использовать только net.ipv4.tcp_wmem и вообще никогда не указывать "listen ... sndbuf=..." в nginx.conf, чтобы он не вызвал setsockopt и не отключал автонастройку в ядре? Posted at Nginx Forum: https://forum.nginx.org/read.php?21,274966,274996#msg-274996

[njs] Fixed Object.prototype.hasOwnProperty() without arguments.

2017-06-20 Thread Dmitry Volyntsev
details: http://hg.nginx.org/njs/rev/36947c6cb8c6 branches: changeset: 373:36947c6cb8c6 user: Dmitry Volyntsev date: Tue Jun 20 18:06:19 2017 +0300 description: Fixed Object.prototype.hasOwnProperty() without arguments. diffstat: njs/njs_object.c | 2 +-

Re: [nginx] slice module issue

2017-06-20 Thread Roman Arutyunyan
You can pass a mapped variable to "proxy_set_header Range" which falls back to whatever you want for multi-range requests. On Tue, Jun 20, 2017 at 03:47:02PM +, 洪志道 wrote: > If we wan't to slice in the case of multi-page, how to achieve it? > > 洪志道 于2017年6月20日

Re: [patch] Http image_filter: return 405 when method is HEAD andbodyis empty.

2017-06-20 Thread 胡聪 (hucc)
Hi, On Tuesday, Jun 20, 2017 11:53 PM +0300, Maxim Dounin wrote: >> >On Tue, Jun 20, 2017 at 12:56:15AM +0800, 胡聪 (hucc) wrote: >> > >> >> Returning 415 does not conform to the HTTP protocol when image and >> >> proxy_pass >> >> configured in same location. >> >> >> >> # HG changeset patch >>

Re: [PATCH] Output chain: propagate last_buf flag to c->send_chain()

2017-06-20 Thread Maxim Dounin
Hello! On Sat, Jun 17, 2017 at 01:59:44PM -0700, Piotr Sikora via nginx-devel wrote: > # HG changeset patch > # User Piotr Sikora > # Date 1491708381 25200 > # Sat Apr 08 20:26:21 2017 -0700 > # Node ID 3363bdf821c7110b577437bd59c962653f3a144f > # Parent

Re: [patch] Http image_filter: return 405 when method is HEAD andbody is empty.

2017-06-20 Thread Maxim Dounin
Hello! On Tue, Jun 20, 2017 at 02:07:38AM +0800, 胡聪 (hucc) wrote: > Hi, > > On Tuesday, Jun 20, 2017 1:21 AM +0300, Maxim Dounin wrote: > > >On Tue, Jun 20, 2017 at 12:56:15AM +0800, 胡聪 (hucc) wrote: > > > >> Returning 415 does not conform to the HTTP protocol when image and > >> proxy_pass >

Re: [nginx] slice module issue

2017-06-20 Thread 洪志道
If we wan't to slice in the case of multi-page, how to achieve it? 洪志道 于2017年6月20日 周二23:21写道: > You said the module doesn't support multi-range, it means nothing to > support slice feature through $slice_range. > Anyway we can avoid it by access handle, but it's still

Re: [nginx] slice module issue

2017-06-20 Thread 洪志道
You said the module doesn't support multi-range, it means nothing to support slice feature through $slice_range. Anyway we can avoid it by access handle, but it's still unconvinient. Roman Arutyunyan 于2017年6月20日 周二21:34写道: > That would disable slicing at all. > > On Tue, Jun 20,

Re: Автоматическое увеличение sndbuf при EAGAIN

2017-06-20 Thread Maxim Dounin
Hello! On Tue, Jun 20, 2017 at 10:31:52AM -0400, Ilya Evseev wrote: > > > > В данном случае хороший ответ на этот вопрос не прослеживается, > > так как автотюнинг буферов сейчас во всех популярных операционных > > системах есть, в том числе на линуксе. > > > > Автотюнинг буферов - это что

Re: [patch] Slice filter: support for empty file.

2017-06-20 Thread Maxim Dounin
Hello! On Tue, Jun 20, 2017 at 10:39:44AM +0800, 胡聪 (hucc) wrote: > Hi, > > >416 will be returned when the request has no Range HEADER and the target > >file is > >empty. Apparently, it does not conform to the HTTP protocol. Empty file > >seems > >inevitable in the CDN service where Nginx is

Re: Автоматическое увеличение sndbuf при EAGAIN

2017-06-20 Thread Ilya Evseev
> > В данном случае хороший ответ на этот вопрос не прослеживается, > так как автотюнинг буферов сейчас во всех популярных операционных > системах есть, в том числе на линуксе. > Автотюнинг буферов - это что именно? Есть sysctl net.ipv4.tcp_wmem с тремя значениями: минимально разрешенное, по

[njs] Fixed Object.prototype.isPrototypeOf() without arguments.

2017-06-20 Thread Dmitry Volyntsev
details: http://hg.nginx.org/njs/rev/1c4d7281d44e branches: changeset: 372:1c4d7281d44e user: Dmitry Volyntsev date: Tue Jun 20 17:12:44 2017 +0300 description: Fixed Object.prototype.isPrototypeOf() without arguments. diffstat: njs/njs_object.c | 2 +-

Re: [nginx] slice module issue

2017-06-20 Thread Roman Arutyunyan
That would disable slicing at all. On Tue, Jun 20, 2017 at 12:42:30PM +, 洪志道 wrote: > Do you think it's better to set $slice_range not found as if multi-range > request? > > Roman Arutyunyan 于2017年6月20日 周二20:09写道: > > > Hi, > > > > On Tue, Jun 20, 2017 at 02:25:14AM +0800,

Re: [nginx] slice module issue

2017-06-20 Thread 洪志道
Do you think it's better to set $slice_range not found as if multi-range request? Roman Arutyunyan 于2017年6月20日 周二20:09写道: > Hi, > > On Tue, Jun 20, 2017 at 02:25:14AM +0800, 洪志道 wrote: > > Hi! > > > > Have a look at the following example first. > > > > server { > > listen

Re: Proxy LDAP port TCP 389

2017-06-20 Thread jcreek
Problem was SELinux. Ran the following to create a rule to allow the traffic: grep nginx /var/log/audit/audit.log | audit2allow -M ldap semodule -i ldap.pp Posted at Nginx Forum: https://forum.nginx.org/read.php?2,274942,274981#msg-274981 ___ nginx

Re: [nginx] slice module issue

2017-06-20 Thread Roman Arutyunyan
Hi, On Tue, Jun 20, 2017 at 02:25:14AM +0800, 洪志道 wrote: > Hi! > > Have a look at the following example first. > > server { > listen 80; > > location / { > slice 10; > proxy_set_header Range $slice_range; > proxy_pass http://127.0.0.1:81; > } >

Re: Configure Nginx for virtual hosts with same port

2017-06-20 Thread Jim Ohlstein
Hello, On 06/20/2017 06:17 AM, guruprasads wrote: Hi all, I am trying to configure 3 virtual hosts for single server with same port, but php is not working for all virtual hosts. My requirement is as below, IP:port-A/ IP:port-A/local IP:port-A/viewer These 3 virtual hosts i want to

Configure Nginx for virtual hosts with same port

2017-06-20 Thread guruprasads
Hi all, I am trying to configure 3 virtual hosts for single server with same port, but php is not working for all virtual hosts. My requirement is as below, IP:port-A/ IP:port-A/local IP:port-A/viewer These 3 virtual hosts i want to configure, only html contents are displaying on browser, if

Re: proxy_send_timeout 180; vs proxy_send_timeout 180s;

2017-06-20 Thread Gena Makhomed
On 20.06.2017 11:36, Dothris wrote: Тут http://skeletor.org.ua/?p=2752 пишут что корректно писать proxy_send_timeout 180s; Но я много вижу где пишут без буквы 's'. В обоих случаях nginx ошибок не выдает Так как правильно и корректно писать? Можно и так и так писать. "Значение без суффикса

proxy_send_timeout 180; vs proxy_send_timeout 180s;

2017-06-20 Thread Dothris
Добрый день! Тут http://skeletor.org.ua/?p=2752 пишут что корректно писать proxy_send_timeout 180s; Но я много вижу где пишут без буквы 's'. В обоих случаях nginx ошибок не выдает Так как правильно и корректно писать? Posted at Nginx Forum: