Re: Get rid of args from $request_uri

2017-08-08 Thread c0nw0nk
why don't you use $uri $is_args $args This will build the URL like. index.php ? arguement=value=morevalue $request_uri will always output the full URL. Not individual segments of it. If you want the first part of the url only just use $uri on its own.

Re: Problem with uWSGI and PATH_INFO

2017-08-08 Thread Francis Daly
On Sun, Aug 06, 2017 at 12:28:11PM +0200, Roberto De Ioris wrote: > > On Sat, Aug 05, 2017 at 11:47:24AM -0400, Etienne Robillard wrote: Hi there, > nginx is not able to correctly split PATH_INFO accordingly to SCRIPT_NAME That is correct. It is similarly correct that nginx is not able to know

Re: [nginx-announce] nginx-1.13.4

2017-08-08 Thread Kevin Worthington
Hello Nginx users, Now available: Nginx 1.13.4 for Windows https://kevinworthington.com/nginxwin1134 (32-bit and 64-bit versions) These versions are to support legacy users who are already using Cygwin based builds of Nginx. Officially supported native Windows binaries are at nginx.org.

Get rid of args from $request_uri

2017-08-08 Thread chilly_bang
Hi I want to build a construction like location ~* { if ($args ~ *) { add_header Link "<$scheme://$http_host$request_uri>; rel=\"canonical\""; } } but need to get rid of argues from $request_uri. The goal is from any url with parameters to point with canonical auf non-parameter url

Re: Get rid of args from $request_uri

2017-08-08 Thread chilly_bang
c0nw0nk Wrote: --- > why don't you use > > $uri Is it not so, that $uri will output an encoded url? Posted at Nginx Forum: https://forum.nginx.org/read.php?2,275930,275937#msg-275937 ___ nginx

Re: Get rid of args from $request_uri

2017-08-08 Thread Zhang Chao
On 8 August 2017 at 22:02:32, chilly_bang (nginx-fo...@forum.nginx.org) wrote: c0nw0nk Wrote: --- > why don't you use > > $uri Is it not so, that $uri will output an encoded url? $uri is always the one decode once time and merge the slash(if

nginx-1.13.4

2017-08-08 Thread Maxim Dounin
Changes with nginx 1.13.408 Aug 2017 *) Feature: the ngx_http_mirror_module. *) Bugfix: client connections might be dropped during configuration testing when using the "reuseport" parameter of the "listen" directive on Linux. *)

Re: Get rid of args from $request_uri

2017-08-08 Thread Lucas Rolff
I use the set_misc module from openresty and do something like: if ($request_uri ~ "([^/?]*)(?:\?|$)") { set $double_encoded_filename $1; } set_unescape_uri $encoded_uri $double_encoded_uri; Can probably be improved, but I can use $encoded_uri and get the reslt you’re looking

Building and packaging dynamic modules

2017-08-08 Thread Guilherme Capilé via nginx
Ola, I'm not sure if I should address this list or the nginx-devel, but I'd like to automate the installation/packaging of dynamic modules for nginx (right now focused on centos7). As far as I understood, dynamic modules can be compiled apart of the nginx installation, so if I got the source for

Re: [PATCH] Add proxy_protocol option to mail listener

2017-08-08 Thread Wayde Nie
Thanks Kees and Maxim, for the patch and the discussion. A very helpful community! This looks like it's working well for my use case for a tcp465/"ssl on" mail proxy server block. My earlier issues appear to have (at least partly) been related to STARTTLS with a tcp587/"starttls only" block that

Динамический CRL для SSL сертификатов "клиентов"

2017-08-08 Thread leonid_belkind
Уважемые коллеги, Мы пытаемся создать конфигурацию NGINX для проверки сертификатов "клиентов". Кофигурация работает, но единственный способ передать информацию об отозванном сертификате это CRL файл. В нашем случае это очень проблематично, поскольку у нас прокси разбросан в контейнерах

Re: Динамический CRL для SSL сертификатов "клиентов"

2017-08-08 Thread Alex Domoradov
> Если работать с файлами, то нужно будет их копировать на все хосты, и потом перезагружать конфигурацию NGINX для такого рода задач давно придумали ansible и т.п. утилиты. В чем проблема? 2017-08-08 11:40 GMT+03:00 leonid_belkind : > Уважемые коллеги, > > Мы

Re: Условие или

2017-08-08 Thread Gena Makhomed
On 08.08.2017 1:54, z6464 wrote: Подскажите как в этом примере сделать чтобы срабатывало или первое условие или второе set $condition 0; if ( $request_method = GET ) { set $condition 1; } if ( $http_cookie !~* "auth_token" ) { set $condition 1; } if ( $condition ) { return 418; } -- Best

Re: Условие или

2017-08-08 Thread Vadim Lazovskiy
Здравствуйте. Можно сделать через map. Не проверял, но наверное сработает: map $request_method$cookie_auth_token $redirect { "~^GET.+" 1; default 0; } ... if ($redirect) { return 418; } В случае непустой куки строка $request_method$cookie_auth_token смапится в единицу. 8 августа

[nginx] Slab: fixed initialization on win32.

2017-08-08 Thread Ruslan Ermilov
details: http://hg.nginx.org/nginx/rev/69f9ee0342db branches: changeset: 7081:69f9ee0342db user: Ruslan Ermilov date: Tue Aug 08 15:16:01 2017 +0300 description: Slab: fixed initialization on win32. On Windows, a worker process does not call ngx_slab_init() from

Re: Динамический CRL для SSL сертификатов "клиентов"

2017-08-08 Thread leonid_belkind
Ansible и подобные утилиты хороши для "развёртки" продуктов. Оне не предназначены для использования как часть бэк-энда продукта. Это конечно можно сделать, но это просто не правильно. В нашем продукте, certificate revokation это часть стандартного функционала. Задача не автоматизировать

Re: Динамический CRL для SSL сертификатов "клиентов"

2017-08-08 Thread Aleksandr Sytar
Выкатка нового CLR по хостам разве не похожа на задачу деплоя? 8 августа 2017 г., 15:00 пользователь leonid_belkind < nginx-fo...@forum.nginx.org> написал: > Ansible и подобные утилиты хороши для "развёртки" продуктов. > Оне не предназначены для использования как часть бэк-энда продукта. Это >

Re: Supporting the Forwarded header (RFC 7239)

2017-08-08 Thread Maxim Dounin
Hello! On Tue, Aug 08, 2017 at 11:52:58AM +0300, Vasiliy Faronov wrote: > Hi Maxim, > > Thank you for your reply. > > > > I don't see how this is explicitly allowed by RFC 7239. > > In Section 4: > >A proxy MAY remove all "Forwarded" header fields from a request. Obviously enough,

Re: Зацикливание на редиректе

2017-08-08 Thread Иван
Здравствуйте! Бесполезная нагрузка на сервер создается не более, чем от множественных запросов к серверу. Проблема не в сервере, а в неправильном понимании Вами стандарта. Уязвимости никакой нет, что Вам и пытались показать. С уважением, Иван. В письме от 8 августа 2017 08:11:32 пользователь

Re: [PATCH 12 of 14] Proxy: add HTTP/2 support

2017-08-08 Thread Maxim Dounin
Hello! On Tue, Jul 25, 2017 at 06:28:16PM -0700, Piotr Sikora wrote: > Hey Maxim, > > > There are serious concerns about this and with other patches. > > Most generic ones are outlined below. > > > > 1. Server-side HTTP/2 code complexity concerns. > > > > As per discussion with Valentin,

Re: [PATCH] Add proxy_protocol option to mail listener

2017-08-08 Thread Maxim Dounin
Hello! On Mon, Aug 07, 2017 at 03:23:12PM +0200, Kees Bos wrote: > # HG changeset patch > # User Kees Bos > # Date 1500565189 0 > #  Thu Jul 20 15:39:49 2017 + > # Node ID 327f18e079b175b14277a23e75715f5feee34d69 > # Parent  

[nginx] Updated PCRE used for win32 builds.

2017-08-08 Thread Maxim Dounin
details: http://hg.nginx.org/nginx/rev/74431027af26 branches: changeset: 7082:74431027af26 user: Maxim Dounin date: Tue Aug 08 15:21:10 2017 +0300 description: Updated PCRE used for win32 builds. diffstat: misc/GNUmakefile | 2 +- 1 files changed, 1

[njs] Added tag 0.1.12 for changeset c07b060396be

2017-08-08 Thread Igor Sysoev
details: http://hg.nginx.org/njs/rev/f47b1eed6ed8 branches: changeset: 396:f47b1eed6ed8 user: Igor Sysoev date: Tue Aug 08 18:06:53 2017 +0300 description: Added tag 0.1.12 for changeset c07b060396be diffstat: .hgtags | 1 + 1 files changed, 1 insertions(+), 0

Re: Проблемы с proxy connect timeout

2017-08-08 Thread d.sibilkov
>Модули ngx_stream_proxy_module и ngx_http_proxy_module - это два >совершенно разных модуля, и каждый имеет свои собственные >конфигурационные директивы. Как мне тогда понять какой proxy_connect_timeout я использую и в чем разница? >Для начала стоит разобраться в том, почему "упавший" бекенд

nginx-1.13.4

2017-08-08 Thread Maxim Dounin
Изменения в nginx 1.13.4 08.08.2017 *) Добавление: модуль ngx_http_mirror_module. *) Исправление: клиентские соединения могли сбрасываться при тестировании конфигурации, если использовался параметр reuseport директивы listen на

[njs] Removed unused field.

2017-08-08 Thread Igor Sysoev
details: http://hg.nginx.org/njs/rev/bc306c37d037 branches: changeset: 392:bc306c37d037 user: Igor Sysoev date: Tue Aug 08 17:47:55 2017 +0300 description: Removed unused field. diffstat: njs/njs_parser.c| 12 njs/njs_parser.h

[njs] Style fix in Unicode header files and Perl scripts which

2017-08-08 Thread Igor Sysoev
details: http://hg.nginx.org/njs/rev/49a8c7cfb121 branches: changeset: 393:49a8c7cfb121 user: Igor Sysoev date: Tue Aug 08 17:47:56 2017 +0300 description: Style fix in Unicode header files and Perl scripts which generate the files. diffstat:

[njs] Disabled njs_object_prop_alloc() inlining.

2017-08-08 Thread Igor Sysoev
details: http://hg.nginx.org/njs/rev/bd7e5e51b6be branches: changeset: 394:bd7e5e51b6be user: Igor Sysoev date: Tue Aug 08 18:05:11 2017 +0300 description: Disabled njs_object_prop_alloc() inlining. diffstat: njs/njs_object.c | 2 +- 1 files changed, 1

[nginx] release-1.13.4 tag

2017-08-08 Thread Maxim Dounin
details: http://hg.nginx.org/nginx/rev/2f48ab272052 branches: changeset: 7084:2f48ab272052 user: Maxim Dounin date: Tue Aug 08 18:00:11 2017 +0300 description: release-1.13.4 tag diffstat: .hgtags | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diffs

[njs] Version 0.1.12.

2017-08-08 Thread Igor Sysoev
details: http://hg.nginx.org/njs/rev/c07b060396be branches: changeset: 395:c07b060396be user: Igor Sysoev date: Tue Aug 08 18:05:14 2017 +0300 description: Version 0.1.12. diffstat: CHANGES | 6 ++ Makefile | 2 +- 2 files changed, 7 insertions(+), 1

[nginx] nginx-1.13.4-RELEASE

2017-08-08 Thread Maxim Dounin
details: http://hg.nginx.org/nginx/rev/bbc642c813c8 branches: changeset: 7083:bbc642c813c8 user: Maxim Dounin date: Tue Aug 08 18:00:11 2017 +0300 description: nginx-1.13.4-RELEASE diffstat: docs/xml/nginx/changes.xml | 65

[njs] Style fixes.

2017-08-08 Thread Igor Sysoev
details: http://hg.nginx.org/njs/rev/e2baf506be4c branches: changeset: 391:e2baf506be4c user: Igor Sysoev date: Tue Aug 08 17:47:53 2017 +0300 description: Style fixes. diffstat: njs/njs_generator.c | 5 + njs/njs_variable.c | 3 --- 2 files changed, 1