Re: Nginx 1.7.0: location @php

2014-05-31 Thread TECK
Hi Francis, Answer #1: what does does not work mean? When I process an URI request, it downloads the file instead of executing the PHP code. What I try to achieve is very simple, use @php as location to execute PHP code instead of repeating it over and over in various locations. Here it is a

Re: reverse proxy through upstream proxy

2014-05-31 Thread Francis Daly
On Fri, May 30, 2014 at 11:03:42PM -0400, pba wrote: Hi there, I'm trying to configure nginx as a reverse proxy where the upstream traffic has to go through another proxy (squid in this case) without success. I believe that nginx as a client can speak http to a http server, and http-over-ssl

Re: Nginx 1.7.0: location @php

2014-05-31 Thread Francis Daly
On Sat, May 31, 2014 at 01:59:18AM -0400, TECK wrote: Hi there, Answer #1: what does does not work mean? When I process an URI request, it downloads the file instead of executing the PHP code. Perhaps the request that you made did not match the location blocks that you showed? That's the

Re: Nginx 1.7.0: location @php

2014-05-31 Thread TECK
Francis, I'm guessing that you may want something like try_files i-dislike-macro-include @php; What you posted is some deprecated configuration available on Google. Perhaps the request that you made did not match the location blocks that you showed? If that would be the case, the proper code

Wildcard proxy_cache_purge doesn't work

2014-05-31 Thread Ventzy
I have cache setup like this: proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=pagecache:10m; location / { ... proxy_cache pagecache; proxy_cache_key $scheme://$host$request_uri; } And it works as expected. I want cache purging and it works for single url, but not for wildcard url.

Re: Wildcard proxy_cache_purge doesn't work

2014-05-31 Thread Kurt Cancemi
Hello, I think this is only supported in the commercial edition of nginx. You are using the ngx_cache_purge module see here https://github.com/FRiCKLE/ngx_cache_purge/blob/master/TODO.md, which doesn't support wildcard urls. --- Kurt Cancemi http://www.getwnmp.org On Sat, May 31, 2014 at 12:40

Re: Help with shared memory usage

2014-05-31 Thread Wandenberg Peixoto
Hello Maxim, I executed my tests again and seems that your improved patch version is working fine too. Did you plan to merge it on nginx core soon? Regards On Wed, May 28, 2014 at 3:41 PM, Maxim Dounin mdou...@mdounin.ru wrote: Hello! On Wed, Jan 22, 2014 at 08:51:50PM +0400, Maxim Dounin

Re: [PATCH] Core: merge adjacent free slab pages to ameliorate fragmentation from multi-page blocks (Was Re: Help with shared memory usage)

2014-05-31 Thread Wandenberg Peixoto
Hello Maxim, I executed my tests again and seems that your improved patch version is working fine too. Did you plan to merge it on nginx core soon? -agentzh Did you have opportunity to check if it works for you? Regards On Wed, May 28, 2014 at 3:38 PM, Maxim Dounin mdou...@mdounin.ru

Re: [PATCH] Core: merge adjacent free slab pages to ameliorate fragmentation from multi-page blocks (Was Re: Help with shared memory usage)

2014-05-31 Thread Yichun Zhang (agentzh)
Hi Maxim! On Wed, May 28, 2014 at 11:38 AM, Maxim Dounin wrote: Below is a patch which does mostly the same without introducing any additional per-page fields. Please take a look if it works for you. Thank you for looking into this! I've run my local test suite for this issue against an

Как прибить специфических ботов средствами Nginx

2014-05-31 Thread lisua
Добрый день! Как прибить специфических ботов средствами Nginx: 1) Боты шлют строго keep-alive: 300 в http заголовке 2) Другие боты не шлют поля accept_language Какими правилами без включения расширенного логгирования и бана по крону средствами ipset например, можно прибанить ботов, имееться

Re: Как прибить специфических ботов средствами Nginx

2014-05-31 Thread Михаил Монашёв
Здравствуйте, lisua. Как прибить специфических ботов средствами Nginx: 1) Боты шлют строго keep-alive: 300 в http заголовке 2) Другие боты не шлют поля accept_language Какими правилами без включения расширенного логгирования и бана по крону средствами ipset например, можно прибанить ботов,

Re: Как прибить специфических ботов средствами Nginx

2014-05-31 Thread lisua
Можно пример Пиши лог нужные поля, а в цикле с паузой в секунду грепай этой лог по известным значения Банить умею, а вот с кастом логами Nginx пытался, но ниасилил, к сожалению, и неужели Nginx не умеет с отлупом 444 банить по сигнатуре http хедера досих пор ? У меня последняя версия Nginx, OS

Re: Как прибить специфических ботов средствами Nginx

2014-05-31 Thread lisua
Причём парсер строк с таким форматом 178.124.200.135|Mon 26 May 2014 15:21:36 +0200|200|26020||GET / HTTP/1.1|Host: bla.ru|Keep-Alive: 300|Connection: keep-alive|User-Agent: Mozilla/5.0 (compatible; iaskspider/1.0; MSIE 6.0) |Referer: hb4wx3n06hyw22.biz у меня есть уже готовый под другой реверс

Re: Как прибить специфических ботов средствами Nginx

2014-05-31 Thread lisua
По второму вопросу разобрался сам, те по accept_language блокировке средствами Nginx по отсутствию поля в заголовке, а вот с keep-alive: 300 в http заголовке я пока не понимаю как блокировать, попытки через: if ($http_keepalive_timeout ~* '300') { return 403; } результата на тестовом генераторе

Re: Как прибить специфических ботов средствами Nginx

2014-05-31 Thread Daniel Podolsky
2014-06-01 0:04 GMT+04:00 lisua nginx-fo...@nginx.us: неужели Nginx не умеет с отлупом 444 банить по сигнатуре http хедера досих пор ? с одной стороны - умеет. с другой - какой в этом смысл? мы же хотим защитить nginx от бездарной траты ресурсов на этих ботов, так? а для того, чтобы банить по