Nginx hack day project

2016-04-11 Thread CJ Ess
I was trying to think of a hack day project, and one idea was to implement
a blob server similar to Facebook's haystack. Facebook did their server
with the evhttpd library, I was thinking of making it an nginx module. In
order to make it work I'd need to have nginx send a range of bytes from a
larger file as bytes 0..x of the requested object. Is there a capability to
do that within Nginx?

I could only find one module that did something similar, and it copied the
data it wanted to a seperate file before sending it. However, it was an old
module so it might not represent the abilities of modern nginx.
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Re: TLS/SSL Cache Automatic Purge

2016-04-11 Thread B.R.
Hello,

@Maxim
Just to be perfectly clear: does that mean that session tickets are
supported for any version of nginx (including 
have all your answers.
---
*B. R.*

On Mon, Apr 11, 2016 at 3:31 PM, Maxim Dounin  wrote:

> Hello!
>
> On Mon, Apr 11, 2016 at 01:23:02PM +0200, B.R. wrote:
>
> [...]
>
> > On a side-note, by default nginx does not store session parameters as it
> > prefers tickets
> > <
> http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_session_tickets
> >,
> > supported since v1.5.9, over sessions ID.
>
> Session tickets supported as long as OpenSSL version used supports
> them, that is, with OpenSSL 0.9.8f or later.
>
> In nginx 1.5.9 the "ssl_session_tickets" directive was added,
> which makes it possible to disable session tickets when needed.
>
> --
> Maxim Dounin
> http://nginx.org/
>
> ___
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Re: Does "include" use the "configuration prefix" or the "path prefix"?

2016-04-11 Thread Maxim Dounin
Hello!

On Mon, Apr 11, 2016 at 06:52:25PM +, hroku...@yahoo.com wrote:

> I've read the documentation and it implies the "path prefix" 
> would be used for the "include" directive.
> 
> Example: "include  mime.types"
> 
> However, in practice, the "configuration prefix" is always used 
> even if the file is found within the "path prefix".
> Is this the correct behaviour? 

Yes, this is correct behaviour.  Configuration-specific paths like 
in the "include" directive are resolved relative to the conf prefix, 
that is, relative to the directory where nginx.conf file resides.

-- 
Maxim Dounin
http://nginx.org/

___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx


Re: переменные в map -> proxy_pass

2016-04-11 Thread Den Bozhok
Благодарю за ответ!Однако, резолвер описан, и все-равно ошибка присутствует:  resolver 10.1.1.5 10.1.1.4  valid=10s;resolver_timeout 5s; 11.04.2016, 18:53, "kpoxa" :В конфиге опишите резолвер.http://nginx.org/ru/docs/http/ngx_http_core_module.html#resolver пн, 11 апр. 2016 г. в 18:04, Den Bozhok :Доброго дня! Попробовал использовать map для выбора бэкенда, что бы затем передавать ее в proxy_pass, но при передаче переменной в proxy_pass nginx не может ее разрезолвить в итоговое значение. конфигурация: geo $backend1 {default "long-host-name1.com";}geo $backend2 {default "long-host-name2.com";} map $http_x_backend $backend {"host1" $backend1;"host2" $backend2;} server {listen 80; location / {proxy_pass http://$backend;}} При этом я получаю ошибку:$backend could not be resolved (2: Server failure) Я что-то делаю не так или у nginx нет такой возможности?Благодарю! nginx -Vnginx version: nginx/1.9.10built by gcc 4.9.2 (Debian 4.9.2-10)built with OpenSSL 1.0.1k 8 Jan 2015TLS SNI support enabledconfigure arguments:--with-ld-opt=-Wl,-rpath,/usr/local/lib--prefix=/etc/nginx--sbin-path=/usr/sbin/nginx--conf-path=/etc/nginx/nginx.conf--error-log-path=/var/log/nginx/error.log--http-log-path=/var/log/nginx/access.log--pid-path=/var/run/nginx.pid--lock-path=/var/run/nginx.lock--http-client-body-temp-path=/var/cache/nginx/client_temp--http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp--http-proxy-temp-path=/var/cache/nginx/proxy_temp--http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp--http-scgi-temp-path=/var/cache/nginx/scgi_temp--user=nginx--group=nginx--with-http_ssl_module--with-stream_ssl_module--with-http_realip_module--with-http_addition_module--with-http_gunzip_module--with-http_gzip_static_module--with-http_v2_module--with-threads--with-http_geoip_module--with-ipv6--with-http_stub_status_module--add-module=/opt/ngx_devel_kit-0.2.19--add-module=/opt/lua-nginx-module-0.10.0 ___nginx-ru mailing listnginx-ru@nginx.orghttp://mailman.nginx.org/mailman/listinfo/nginx-ru,___nginx-ru mailing listnginx-ru@nginx.orghttp://mailman.nginx.org/mailman/listinfo/nginx-ru___
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru

[PATCH] Fixed typos

2016-04-11 Thread Alessandro Ghedini
# HG changeset patch
# User Alessandro Ghedini 
# Date 1460389631 -3600
#  Mon Apr 11 16:47:11 2016 +0100
# Node ID 892560ebe055092c3bed769234b2bae19d67fb71
# Parent  7640d6c213e150669c8ca7b4005f4c09bf360070
Fixed typos.

diff -r 7640d6c213e1 -r 892560ebe055 
src/http/modules/ngx_http_ssi_filter_module.c
--- a/src/http/modules/ngx_http_ssi_filter_module.c Fri Apr 08 15:03:38 
2016 +0300
+++ b/src/http/modules/ngx_http_ssi_filter_module.c Mon Apr 11 16:47:11 
2016 +0100
@@ -2525,7 +2525,7 @@ ngx_http_ssi_if(ngx_http_request_t *r, n
 }
 
 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
-   "evaluted left: \"%V\"", );
+   "evaluated left: \"%V\"", );
 
 if (p == last) {
 if (left.len) {
@@ -2589,7 +2589,7 @@ ngx_http_ssi_if(ngx_http_request_t *r, n
 }
 
 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
-   "evaluted right: \"%V\"", );
+   "evaluated right: \"%V\"", );
 
 if (noregex) {
 if (left.len != right.len) {

___
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel


Re: переменные в map -> proxy_pass

2016-04-11 Thread kpoxa
В конфиге опишите резолвер.
http://nginx.org/ru/docs/http/ngx_http_core_module.html#resolver

пн, 11 апр. 2016 г. в 18:04, Den Bozhok :

> Доброго дня!
>
> Попробовал использовать map для выбора бэкенда, что бы затем передавать ее
> в proxy_pass, но при передаче переменной в proxy_pass nginx не может ее
> разрезолвить в итоговое значение.
>
> конфигурация:
>
>
> geo $backend1 {
> default "long-host-name1.com";
> }
> geo $backend2 {
> default "long-host-name2.com";
> }
>
> map $http_x_backend $backend {
> "host1" $backend1;
> "host2" $backend2;
> }
>
> server {
> listen 80;
>
> location / {
> proxy_pass http://$backend;
> }
> }
>
>
> При этом я получаю ошибку:
> $backend could not be resolved (2: Server failure)
>
> Я что-то делаю не так или у nginx нет такой возможности?
> Благодарю!
>
> nginx -V
> nginx version: nginx/1.9.10
> built by gcc 4.9.2 (Debian 4.9.2-10)
> built with OpenSSL 1.0.1k 8 Jan 2015
> TLS SNI support enabled
> configure arguments:
> --with-ld-opt=-Wl,-rpath,/usr/local/lib
> --prefix=/etc/nginx
> --sbin-path=/usr/sbin/nginx
> --conf-path=/etc/nginx/nginx.conf
> --error-log-path=/var/log/nginx/error.log
> --http-log-path=/var/log/nginx/access.log
> --pid-path=/var/run/nginx.pid
> --lock-path=/var/run/nginx.lock
> --http-client-body-temp-path=/var/cache/nginx/client_temp
> --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp
> --http-proxy-temp-path=/var/cache/nginx/proxy_temp
> --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp
> --http-scgi-temp-path=/var/cache/nginx/scgi_temp
> --user=nginx
> --group=nginx
> --with-http_ssl_module
> --with-stream_ssl_module
> --with-http_realip_module
> --with-http_addition_module
> --with-http_gunzip_module
> --with-http_gzip_static_module
> --with-http_v2_module
> --with-threads
> --with-http_geoip_module
> --with-ipv6
> --with-http_stub_status_module
> --add-module=/opt/ngx_devel_kit-0.2.19
> --add-module=/opt/lua-nginx-module-0.10.0
>
> ___
> nginx-ru mailing list
> nginx-ru@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-ru
___
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru

Re: reuseport в конфигах nginx

2016-04-11 Thread Валентин Бартенев
On Monday 11 April 2016 16:59:08 navern wrote:
> Да, я читал эту статью.
> 
> Проблема в том, что нам как раз нужен негативный побочный эффект:) 
> Необходимо, чтобы одновременно можно было запустить два nginx'а. Этого 
> можно добиться если везде указать reuseport, но только один раз.
> 

А можно подробнее, зачем такое нужно?


> А можно подробнее о том как лучше решить эту задачу? Какой правильный 
> флоу должен быть? Выставлять везде опцию в конфигах(каждый раз) и 
> убирать проверку на это при парсинге конфигурации?
> 

Правильный Максим уже описал, необходимо проверять все опции, и выдавать
ошибку, только если они отличаются.

Но я лишь о том, что если уж править исходники затем, чтобы применить
опцию "reuseport" по умолчанию, то править функцию парсинга директивы
ngx_http_core_listen(), а не вмешиваться в функционирование.

--
Валентин Бартенев
___
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru

Re: reuseport в конфигах nginx

2016-04-11 Thread Evgeniy Berdnikov
On Mon, Apr 11, 2016 at 04:59:08PM +0300, navern wrote:
> Проблема в том, что нам как раз нужен негативный побочный эффект:)
> Необходимо, чтобы одновременно можно было запустить два nginx'а. Этого можно
> добиться если везде указать reuseport, но только один раз.

 А зачем нужны 2 копии сервера на одном порту? Какому из них должны
 доставаться входящие соединения, и есть ли основания считать, что
 можно дать точный ответ на этот вопрос?
-- 
 Eugene Berdnikov

___
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru

Re: передача в upstream dns имени хоста

2016-04-11 Thread nrr
писал же в предыдущем посте, не подходит этот вариант:
>> Эти варианты не подходят в location /loc/ :
>> proxy_set_header HOST $proxy_host; ## дает upstr1
>> proxy_set_header HOST $host; ## дает имя хоста по какому обратился юзер
(example.org)
>> proxy_set_header HOST $hostname; ## дает имя хоста сервера

Posted at Nginx Forum: 
https://forum.nginx.org/read.php?21,266089,266092#msg-266092

___
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru

переменные в map -> proxy_pass

2016-04-11 Thread Den Bozhok
Доброго дня! Попробовал использовать map для выбора бэкенда, что бы затем передавать ее в proxy_pass, но при передаче переменной в proxy_pass nginx не может ее разрезолвить в итоговое значение. конфигурация: geo $backend1 {default "long-host-name1.com";}geo $backend2 {default "long-host-name2.com";} map $http_x_backend $backend {"host1" $backend1;"host2" $backend2;} server {listen 80; location / {proxy_pass http://$backend;}} При этом я получаю ошибку:$backend could not be resolved (2: Server failure) Я что-то делаю не так или у nginx нет такой возможности?Благодарю! nginx -Vnginx version: nginx/1.9.10built by gcc 4.9.2 (Debian 4.9.2-10)built with OpenSSL 1.0.1k 8 Jan 2015TLS SNI support enabledconfigure arguments:--with-ld-opt=-Wl,-rpath,/usr/local/lib--prefix=/etc/nginx--sbin-path=/usr/sbin/nginx--conf-path=/etc/nginx/nginx.conf--error-log-path=/var/log/nginx/error.log--http-log-path=/var/log/nginx/access.log--pid-path=/var/run/nginx.pid--lock-path=/var/run/nginx.lock--http-client-body-temp-path=/var/cache/nginx/client_temp--http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp--http-proxy-temp-path=/var/cache/nginx/proxy_temp--http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp--http-scgi-temp-path=/var/cache/nginx/scgi_temp--user=nginx--group=nginx--with-http_ssl_module--with-stream_ssl_module--with-http_realip_module--with-http_addition_module--with-http_gunzip_module--with-http_gzip_static_module--with-http_v2_module--with-threads--with-http_geoip_module--with-ipv6--with-http_stub_status_module--add-module=/opt/ngx_devel_kit-0.2.19--add-module=/opt/lua-nginx-module-0.10.0 ___
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru

Re: передача в upstream dns имени хоста

2016-04-11 Thread Vadim A. Misbakh-Soloviov
proxy_set_header Host $host;
?

-- 
wbr,
mva

signature.asc
Description: This is a digitally signed message part.
___
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru

Re: передача в upstream dns имени хоста

2016-04-11 Thread nrr
вот здесь
http://serverfault.com/questions/598202/make-nginx-to-pass-hostname-of-the-upstream-when-reverseproxying
описан немного кривой способ:

server {
  listen  8001 default_server;
  server_name web1.example.com;
  location / {
proxy_pass   http://web1.local:80;
proxy_set_header Host web1.local:80;
  }
}

server {
  listen  8002 default_server;
  server_name web2.example.com;
  location / {
proxy_pass   http://web2.local:80;
proxy_set_header Host web2.local:80;
  }
}

server {
  listen  8003 default_server;
  server_name web3.example.com;
  location / {
proxy_pass   http://web3.local:80;
proxy_set_header Host web3.local:80;
  }
}

upstream main {
  server 127.0.0.1:8001;
  server 127.0.0.1:8002;
  server 127.0.0.1:8003;
}

server {
  listen  80;
  server_name example.com;
  location / {
proxy_pass http://main;
  }
}

но есть ли проще?

Posted at Nginx Forum: 
https://forum.nginx.org/read.php?21,266089,266090#msg-266090

___
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru

передача в upstream dns имени хоста

2016-04-11 Thread nrr
Добрый день!

имеется конфиг:

upstream upstr1 {
server host1.example.com:80;
server host2.example.com:80;
}
location /loc/ {
proxy_pass http://upstr1/;
}

не подскажете есть ли реальный и простой способ передачи в upstream сервер
имени хоста по какому было обращение?

Т.е. если Nginx выбрал host1.example.com, то передавать туда
host1.example.com, а не IP адрес как это сейчас работает.

Смысл такой, что
server host1.example.com:80;
server host2.example.com:80;
находятся на одном сервере,
и нужно по разному обрабатывать запросы в зависимости от hostname upstream

Эти варианты не подходят в location /loc/ :
proxy_set_header HOST $proxy_host; ## дает upstr1
proxy_set_header HOST $host; ## дает имя хоста по какому 
обратился юзер
(example.org)
proxy_set_header HOST $hostname; ## дает имя хоста сервера

Спасибо!

Posted at Nginx Forum: 
https://forum.nginx.org/read.php?21,266089,266089#msg-266089

___
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru

Re: reuseport в конфигах nginx

2016-04-11 Thread navern

Да, я читал эту статью.

Проблема в том, что нам как раз нужен негативный побочный эффект:) 
Необходимо, чтобы одновременно можно было запустить два nginx'а. Этого 
можно добиться если везде указать reuseport, но только один раз.


А можно подробнее о том как лучше решить эту задачу? Какой правильный 
флоу должен быть? Выставлять везде опцию в конфигах(каждый раз) и 
убирать проверку на это при парсинге конфигурации?


On 11.04.2016 16:49, Валентин Бартенев wrote:

On Monday 11 April 2016 15:14:10 navern wrote:

setsockopt есть всего в двух местах и в одном он нужен, чтобы апгрейдить
сокеты без reuseport'а до reuseport'а, если я правильно понимаю.

Подобный хак позволил запустить одновременно два nginx'а, так что как
минимум что-то полезное он делает.

Это, как раз, негативный побочный эффект.

Опция reuseport не только выставляет флаг на сокет, но и занимается тем,
что создает необходимое количество дескрипторов, по одному на каждый
рабочий процесс.  В этом и есть суть этой опции - оптимизация приема
соединений и равномерное их распределение по рабочим процессам.

Подробности тут:
https://habrahabr.ru/post/259403/


По опции грепал и там действительно много вхождений, на что стоит
обратить внимание? У нас предполагается включенный reuseport всегда.

В общем открыт к предложениям как сделать лучше.


Самым простым решением было бы выставить флаг на этапе парсинга директивы
listen и не вмешиваться в логику обработки флага.

--
Валентин Бартенев
___
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru


___
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru

Re: reuseport в конфигах nginx

2016-04-11 Thread Валентин Бартенев
On Monday 11 April 2016 15:14:10 navern wrote:
> setsockopt есть всего в двух местах и в одном он нужен, чтобы апгрейдить 
> сокеты без reuseport'а до reuseport'а, если я правильно понимаю.
> 
> Подобный хак позволил запустить одновременно два nginx'а, так что как 
> минимум что-то полезное он делает.

Это, как раз, негативный побочный эффект.

Опция reuseport не только выставляет флаг на сокет, но и занимается тем,
что создает необходимое количество дескрипторов, по одному на каждый
рабочий процесс.  В этом и есть суть этой опции - оптимизация приема
соединений и равномерное их распределение по рабочим процессам.

Подробности тут:
https://habrahabr.ru/post/259403/

> 
> По опции грепал и там действительно много вхождений, на что стоит 
> обратить внимание? У нас предполагается включенный reuseport всегда.
> 
> В общем открыт к предложениям как сделать лучше.
> 

Самым простым решением было бы выставить флаг на этапе парсинга директивы
listen и не вмешиваться в логику обработки флага.

--
Валентин Бартенев
___
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru

Re: reuseport в конфигах nginx

2016-04-11 Thread navern
setsockopt есть всего в двух местах и в одном он нужен, чтобы апгрейдить 
сокеты без reuseport'а до reuseport'а, если я правильно понимаю.


Подобный хак позволил запустить одновременно два nginx'а, так что как 
минимум что-то полезное он делает.


По опции грепал и там действительно много вхождений, на что стоит 
обратить внимание? У нас предполагается включенный reuseport всегда.


В общем открыт к предложениям как сделать лучше.

On 09.04.2016 04:43, Валентин Бартенев wrote:

On Friday 08 April 2016 22:32:12 Vadim A. Misbakh-Soloviov wrote:

у вас почтовый клиент понавставлял лишних переносов строк. Можно было,
наверное, аттачем патч приложить

// ну, или без html отправлять

Лучше не стоит.

Простой grep по исходникам может показать, что это не единственное место
где обрабатывается опция reuseport, и иного эффекта, кроме негативного, от
данного патча не будет (в частности опция reuseport так и не заработает
правильно на остальных сокетах).

--
Валентин Бартенев
___
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru


___
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru

disable caching for single virtual host

2016-04-11 Thread absolutely_f...@libero.it
Hi,I am using nginx as reverse proxy cache with Apache.
Basically I use this configuration:
https://www.djm.org.uk/wordpress-nginx-reverse-proxy-caching-setup/

I need to exclude a specific virtual from nginx's cache.

So I added "shop" upstream with this configuration:
upstream backend {ip_hash;server 127.0.0.1:8080; # IP goes 
here.}upstream shop {ip_hash;server 127.0.0.1:8081; # IP 
goes here.}server {listen 1.1.1.1; # IP goes here.
server_name virtual_host_without_cache.domain.org;location / {  
  proxy_pass http://shop;}real_ip_header X-Forwarded-For;
# Set proxy headers for the passthroughproxy_set_header Host 
$host;proxy_set_header X-Real-IP $remote_addr;proxy_set_header 
X-Forwarded-For $proxy_add_x_forwarded_for;#proxy_set_header 
X-Forwarded-For $remote_addr;}
server {listen 1.1.1.1:80; # IP goes here.server_name 
virtual_host_WITH_cache.domain.org; # IP could go here...

Is it correct way to do this?I am still getting in http request header 
regarding caching when I get pages from  virtual_host_without_cache.domain.org:
HTTP/1.1 200 OK
Server: nginx/1.8.1
Date: Mon, 11 Apr 2016 11:00:59 GMT
Content-Type: image/jpeg
Content-Length: 65721
Connection: keep-alive
Last-Modified: Thu, 21 Jan 2016 16:59:08 GMT
ETag: "38292e-100b9-529db055b4f00"
Accept-Ranges: bytes
Expires: Tue, 12 Apr 2016 11:00:59 GMT
Cache-Control: max-age=86400

# nginx -vnginx version: nginx/1.8.1
# cat /etc/redhat-release CentOS release 6.7 (Final)
# httpd -vServer version: Apache/2.2.15 (Unix)Server built:   Mar 22 2016 
19:03:53
Thank you



___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

upstream member liveness

2016-04-11 Thread drookie
What is the scope of the upstream member liveness: is it per upstream group,
or per vhost ?

If the question is unclear, consider I have 3 nginx - one balancer and two
backends, and the following config part on the nginx balancer:


upstream backends {
server 192.168.0.1;
server 192.168.0.2;
}

And on both 192.168.0.1 and 192.168.0.2 the following configs:

server {
server_name A;

root /foo/bar1;

location / {
fastcgi_pass 127.0.0.1:9000;
}
}

server {
server_name B;

root /foo/bar1;

location / {
fastcgi_pass 127.0.0.1:9000;
}
}


server 192.168.0.1 returns 500 for vhost A, will it be considered dead for
vhost B (and I supposed it will be) ?

Thanks.

Posted at Nginx Forum: 
https://forum.nginx.org/read.php?2,266077,266077#msg-266077

___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx


Re: nginx 1.9.14 & upload-progress-module

2016-04-11 Thread Валентин Бартенев
On Saturday 09 April 2016 13:56:03 deniss wrote:
> После обновления nginx не отображается прогрессбар при аплоаде файла.
> В логах:
> 
> 2016/04/09 20:47:37 [debug] 8670#0: *40 malloc: 01249020:16
> 2016/04/09 20:47:37 [debug] 8670#0: *40 upload-progress: get_tracking_id
> found args: fb2573fbf0cdbd7a3e20f5c00f7f6da4
> 2016/04/09 20:47:37 [debug] 8670#0: *40 malloc: 01249040:48
> 2016/04/09 20:47:37 [debug] 8670#0: *40 upload-progress: read_event_handler
> found id: fb2573fbf0cdbd7a3e20f5c00f7f6da4
> 2016/04/09 20:47:37 [debug] 8670#0: *40 http read client request body
> 2016/04/09 20:47:37 [debug] 8670#0: *40 recv: fd:28 2896 of 3507
> 2016/04/09 20:47:37 [debug] 8670#0: *40 http client request body recv 2896
> 2016/04/09 20:47:37 [debug] 8670#0: *40 http client request body rest
> 941014992
> 2016/04/09 20:47:37 [debug] 8670#0: *40 recv: fd:28 -1 of 611
> 2016/04/09 20:47:37 [debug] 8670#0: *40 recv() not ready (11: Resource
> temporarily unavailable)
> 2016/04/09 20:47:37 [debug] 8670#0: *40 http client request body recv -2
> 2016/04/09 20:47:37 [debug] 8670#0: *40 http client request body rest
> 941014992
> 2016/04/09 20:47:37 [debug] 8670#0: *40 event timer: 28, old: 1460227657757,
> new: 1460227657757
> 2016/04/09 20:47:37 [debug] 8670#0: *40 http run request:
> "/doupload/?X-Progress-ID=fb2573fbf0cdbd7a3e20f5c00f7f6da4"
> 2016/04/09 20:47:37 [debug] 8670#0: *40 upload-progress:
> ngx_http_uploadprogress_event_handler
> 2016/04/09 20:47:37 [debug] 8670#0: *40 upload-progress: get_tracking_id
> 2016/04/09 20:47:37 [debug] 8670#0: *40 upload-progress: get_tracking_id no
> header found
> 2016/04/09 20:47:37 [debug] 8670#0: *40 upload-progress: get_tracking_id no
> header found, args found
> 2016/04/09 20:47:37 [debug] 8670#0: *40 upload-progress: get_tracking_id
> found args: X-Progress-ID=fb2573fbf0cdbd7a3e20f5c00f7f6da4 HTTP/1.1
> 
> Подскажите в где копать?
> Спасибо!
> 

Копать в сторону HTML5 и XMLHttpRequest 2.

--
Валентин Бартенев

___
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru

Re: 1.9.14 - Issues with disabled request buffering and HTTP/2

2016-04-11 Thread Валентин Бартенев
On Monday 11 April 2016 05:19:17 n.dom wrote:
> Hello,
> 
> we have an issue with the newest nginx version 1.9.14. I am not sure if this
> is a possible bug or a configuration problem.
> 
> We use nginx with disabled request buffering (proxy_request_buffering off)
> 
> We are currently using nginx 1.9.12 with HTTP/2 enabled. In this setup we
> don't have any issues. I am aware of the fact, that request buffering cannot
> be deactivated with HTTP/2 until version 1.9.13.
> 
> When updating to nginx 1.9.14, request buffering is disabled for HTTP/2 as
> well.
> In this case requests from some of our clients (we tested Firefox and
> OkHttpClient) cannot load our web application anymore.
> In the nginx error log we can see the following lines (non debug):
> 2016/04/07 14:20:49 [info] 20235#0: *3115050 client terminated stream 41
> with status 1 while sending request to upstream, client: [..], server: ,
> request: "POST []"
> 
> This only occurs when the client (Firefox and OkHttpClient) uses HTTP/2. We
> cannot reproduce this issue with Google Chrome! Chrome works like a charm.
> 
> We also found out, that this issue seems only to occur within POST
> requests.
> 
> When enabling proxy request buffering (proxy_request_buffering on), all
> clients work as expected.
> 
> Is there anyone with similar issues when updating to the newest nginx
> version 1.9.14?
> 
[..]

Do you use any 3rd-party modules or patches?  In this case try without them.

Otherwise, please, provide a debug log: 
http://nginx.org/en/docs/debugging_log.html

  wbr, Valentin V. Bartenev

___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx


Re: Error 404 if url contains "star"

2016-04-11 Thread B.R.
The only way to know would have been to have a look at the processes table
before killing everyone and restarting.
If you nginx through the package management of your distribution and
service scripts to manage nginx processus, there is little-to-no chance you
got multiplt nginx masters running. It is however possible to spawn
multiple nginx (master) instances if you manage you processes manually (and
is useful when you do an on-the-fly upgrade). No multiple instances can
bind to listen on the same ports though.

It would have been interesting to dig further, since you are saying the
configuration was valid (as after restart nginx accepted/loaded it).

In the current state, there is not much ability to conclude on anything.
Maybe could you try to reproduce the problem by recreating your old
configuration, loading it and trying to load the current configuraiton
again?
Remember to use `nginx -t` have a look at nginx' error logs on reload to
check the configuration has been accepted.
---
*B. R.*

On Sun, Apr 10, 2016 at 9:27 PM, Alexander Schwarz 
wrote:

> Hello Francis,
>
> you are right. But the weird thing is, i already commented out that line
> (it was for caching/expires headers, and yes, missing the backslash).
>
> Is there any chance I was running two nginx instances? Because it seemed
> my configuration was kind of cached, as i commented that line, but it still
> didn't work. Now, after i completely reinstalled nginx everything is
> working fine.
>
> I got the idea because i downgraded from newest nginx version to a older
> one in my testing. Is it possible that there were multiple instances?
>
> Anyway, thank you very much.
>
>
>
> > Date: Sun, 10 Apr 2016 19:37:35 +0100
> > From: fran...@daoine.org
> > To: nginx@nginx.org
> > Subject: Re: Error 404 if url contains "star"
> >
> > On Sun, Apr 10, 2016 at 07:16:33PM +0200, Alexander Schwarz wrote:
> >
> > Hi there,
> >
> > > i have a very strange problem with my nginx configuration. If the URL
> contains the word "star", i get the standard 404 Error not found page.
> > > I defined a rule that should redirect all requests to index.php.
> >
> > http://nginx.org/r/location
> >
> > Your rule does not redirect *all* requests.
> >
> > > Any ideas?!
> >
> > There's a missing backslash "\" on the "location ~*" line, just before
> > the ".(".
> >
> > f
> > --
> > Francis Daly fran...@daoine.org
> >
> > ___
> > nginx mailing list
> > nginx@nginx.org
> > http://mailman.nginx.org/mailman/listinfo/nginx
>
> ___
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

TLS/SSL Cache Automatic Purge

2016-04-11 Thread Arnaud Van der Vorst
Hi,

 

My name is Arnaud and I am new to the list.

 

I would like to know if NGINX is using any automatic purge mechanism for its
TLS/SSL Cache configured using the following directives:

ssl_session_timeout 10m;

ssl_session_cache shared:SSL:10m;

 

I understand that a daily purge of TLS/SSL Cache is highly recommended to
avoid breaking Perfect Forward Secrecy of the TLS Protocol.

If it does NOT use automatic purge, how can I purge the Shared cache used by
NGINX then?

Are there any command line tools for that purpose?

 

Thank you very much in advance for your answer and have a nice day!

 

Kind regards,

 

Arnaud

___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

cookie issue

2016-04-11 Thread Pankaj Chaudhary
Hi ,

This is Pankaj,I am trying to write  a module which is capable to access
header value and set header and reading cookie and setting cookie.
if i refer apache module then found  apr_table_get() and apr_table_set()
APIs are  available to get/set header/cookie values.
I have tried to use ngx_http_get_variable() API to get cookie value but not
getting any value.
Please help me on this and let me know is any other API which I can use for
the same.



Thanks & Regards,
Pankaj Chaudhary
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

cookie issue

2016-04-11 Thread Pankaj Chaudhary
Hi,

This is Pankaj,I am trying to write  a module which is capable to access
header value and set header and reading cookie and setting cookie.
if i refer apache module then found  apr_table_get() and apr_table_set()
APIs are  available to get/set header/cookie values.
I have tried to use ngx_http_get_variable() API to get cookie value but not
getting any value.
Please help me on this and let me know is any other API which I can use for
the same.



Thanks & Regards,
Pankaj Chaudhary
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx