Quantcast
Channel: Nginx Forum - Nginx Mailing List - Russian
Viewing all 3102 articles
Browse latest View live

Rewrite .htaccess для nginx (no replies)

$
0
0
Доброго времени суток.

Пытаюсь преобразовать такую конструкцию

RewriteRule ^category-(.*)-(.*).html index.php?$2 [QSA,L,NC]
RewriteRule ^forum-(.*)-(.*).html forum.php?$2 [QSA,L,NC]
RewriteRule ^topic-(.*)-(.*).html topic.php?$2 [QSA,L,NC]

для nginx

так

location /category {
rewrite ^/category-(.*)-(.*).html /index.php?$2 break;
}
location /forum {
rewrite ^/forum-(.*)-(.*).html /forum.php?$2 break;
}
location /topic {
rewrite ^/topic-(.*)-(.*).html /topic.php?$2 break;
}

или так

rewrite ^/category-(.*)-(.*).html /index.php/$2 last;
rewrite ^/forum-(.*)-(.*).html /forum.php/$2 last;
rewrite ^/topic-(.*)-(.*).html /topic.php/$2 last;


Ни один вариант не срабатывает.

Почему nginx убирает заголовок Content-Length с ответа fastcgi ? (2 replies)

$
0
0
Доброго времени суток!
С fastcgi приложения передаю заголовок Content-Length, но nginx его убирает (.
не могу понять почему и зачем.
кусочек debug.log :
2014/10/07 21:35:51 [debug] 2740#0: *11 http fastcgi header: "Content-Length: 15868200;"
2014/10/07 21:35:51 [debug] 2740#0: *11 http fastcgi parser: 0
2014/10/07 21:35:51 [debug] 2740#0: *11 http fastcgi header: "X-Content-Length: 15868200;"
2014/10/07 21:35:51 [debug] 2740#0: *11 http fastcgi parser: 0
2014/10/07 21:35:51 [debug] 2740#0: *11 http fastcgi header: "Content-Type: application/octet-stream;"
2014/10/07 21:35:51 [debug] 2740#0: *11 http fastcgi parser: 0
2014/10/07 21:35:51 [debug] 2740#0: *11 http fastcgi header: "Content-Disposition: attachment; filename='file.mp3';"
2014/10/07 21:35:51 [debug] 2740#0: *11 http fastcgi parser: 1
......
2014/10/07 21:35:51 [debug] 2740#0: *11 http fastcgi header done
2014/10/07 21:35:51 [debug] 2740#0: *11 xslt filter header
2014/10/07 21:35:51 [debug] 2740#0: *11 HTTP/1.1 200 OK
Server: nginx
Date: Tue, 07 Oct 2014 18:35:51 GMT
Content-Type: application/octet-stream;
Connection: close
Accept-Ranges: bytes;
X-Content-Length: 15868200;
Content-Disposition: attachment; filename='file.mp3';

После заголовка X-Content-Length
fastcgi parser: 0
и после Content-Length так же fastcgi parser: 0
но, X-Content-Length попадает в ответ, Content-Length нет .

Конфиг:
server {
server_name localhost 127.0.0.1;
location / {
chunked_transfer_encoding off;
fastcgi_pass_header Content-Length;
fastcgi_pass unix://tmp/btfcgi;
#include fastcgi_params;
}
}

Может существует какая то волшебная опция, подскажите пожалуйста )

nginx-1.6.2 Ошибочный синтаксис в конфигурации (4 replies)

$
0
0
server (
...
index index.html
include include.conf;
....
}

Результат:

Performing sanity check on nginx configuration:
nginx: the configuration file /usr/local/etc/nginx/nginx.conf syntax is ok
nginx: configuration file /usr/local/etc/nginx/nginx.conf test is successful


Вместо индекса другая директива, например:
server (
...
error_log /var/log/nginx/error_qqq.log
include include.conf;
....
}
даёт такой результат:

Performing sanity check on nginx configuration:
nginx: [emerg] invalid log level "include" in /usr/local/etc/nginx/vhosts/sites-enabled/sites.conf:15


Теперь error_log после индекса:
server (
...
index index.html
error_log /var/log/nginx/error_qqq.log
include include.conf;
....
}
Получается:

Performing sanity check on nginx configuration:
nginx: [warn] only the last index in "index" directive should be absolute in /usr/local/etc/nginx/vhosts/sites-enabled/sites.conf:15
nginx: the configuration file /usr/local/etc/nginx/nginx.conf syntax is ok
nginx: configuration file /usr/local/etc/nginx/nginx.conf test is successful


Просто "f":
server (
...
index index.html
# error_log /var/log/srv_www/nginx/error_qqq.log
f
include include.conf;
....
}
Такой результат:

Performing sanity check on nginx configuration:
nginx: the configuration file /usr/local/etc/nginx/nginx.conf syntax is ok
nginx: configuration file /usr/local/etc/nginx/nginx.conf test is successful

Если включить "error_log" из последнего примера:
Performing sanity check on nginx configuration:
nginx: [warn] only the last index in "index" directive should be absolute in /usr/local/etc/nginx/vhosts/sites-enabled/sites.conf:16
nginx: the configuration file /usr/local/etc/nginx/nginx.conf syntax is ok
nginx: configuration file /usr/local/etc/nginx/nginx.conf test is successful

Тут 16-я строка: include include.conf;

mod_zip (6 replies)

$
0
0
привет.

Делаю под gentoo ebuild:

....
nginx_modules_http_mod_zip? ( https://github.com/evanmiller/mod_zip/archive/master.zip -> ngx_mod_zip.zip )
....
NGINX_MODULES_3RD="
....
http_mod_zip"
....
if use nginx_modules_http_mod_zip; then
http_enabled=1
myconf+=" --add-module=${WORKDIR}/mod_zip-master"
fi

после установки порта с оверлея, делаю nginx -V:

nginx version: nginx/1.7.4
TLS SNI support enabled
configure arguments: --prefix=/usr --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error_log --pid-path=/run/nginx.pid --lock-path=/run/lock/nginx.lock --with-cc-opt=-I/usr/include --with-ld-opt=-L/usr/lib64 --http-log-path=/var/log/nginx/access_log --http-client-body-temp-path=//var/lib/nginx/tmp/client --http-proxy-temp-path=//var/lib/nginx/tmp/proxy --http-fastcgi-temp-path=//var/lib/nginx/tmp/fastcgi --http-scgi-temp-path=//var/lib/nginx/tmp/scgi --http-uwsgi-temp-path=//var/lib/nginx/tmp/uwsgi --with-file-aio --with-aio_module --with-pcre --without-http_auth_basic_module --without-http_autoindex_module --without-http_geo_module --without-http_scgi_module --without-http_upstream_ip_hash_module --without-http_uwsgi_module --with-http_addition_module --with-http_gzip_static_module --with-http_spdy_module --with-http_stub_status_module --with-http_sub_module --with-http_xslt_module --with-http_realip_module --add-module=external_module/mod_zip-master --add-module=external_module/nginx-upload-progress-module-0.9.1 --add-module=external_module/headers-more-nginx-module-0.25 --add-module=external_module/nginx_upstream_check_module-0.1.9 --without-http-cache --with-http_ssl_module --without-mail_imap_module --without-mail_pop3_module --without-mail_smtp_module --user=nginx --group=nginx

То есть модуль mod_zip присутствует:
--add-module=external_module/mod_zip-master

Но элементарный скриптик из серии:

<?php

$archive = [
0 => "- 1845 /test/1 test.png"
];

header("Content-Disposition: attachment; filename= test.zip");
// header('X-Archive-Files: zip');
echo implode("\r\n", $archive) . "\r\n";
exit();

Даёт скачать архив, но он некорректный. Если раскомментирую X-Archive-Files - сброс соединения. Пробовал ставить с сорцов с добавлением этого модуля версии 1.4.4, 1.4.7, 1.7.4 и 1.7.6, но поведение одинаковое - качаю архив, но битый либо сброс. При этом всё тоже самое на другой лин-машинке (не генту) все проходит превосходно.

Подскажите, пожалуйста, на что обратить внимание, как выполнить дебаг. Может у кого-то была подобная проблема?

Спасибо.

1 basic auth - много субдоменов (3 replies)

$
0
0
Добрый вечер,

Возможно ли настроить HTTP Basic Authentication (auth_basic/auth_basic_user_file) так чтоб однажды успешная авторизация работала на всех субдоменах?

Евгений
_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru

Как передать nginx директиву серверу ? (3 replies)

$
0
0
Здравствуйте.
Нужно передать значения 2ух директив nginx (1 из них от подключаемого модуля comet) проксируемому серверу.

В конфиге параметры заданы:
push_stream_longpolling_connection_ttl 5m;
proxy_buffer_size 64k;

Делаю так:
proxy_set_header X-Comet-Session-Timeout $push_stream_longpolling_connection_ttl;
#proxy_set_header X-Buffer-Size $proxy_buffer_size;

Получаю:
[emerg] unknown "push_stream_longpolling_connection_ttl" variable
(или [emerg] unknown "proxy_buffer_size" variable, если раскомментирована директива выше).

Вопрос:
можно ли, не прибегая к дублированию настроек вида (аналогично для proxy_buffer_size)
set $push_stream_longpolling_connection_ttl "5m";
proxy_set_header X-Comet-Session-Timeout $push_stream_longpolling_connection_ttl;
, передать значение директив ?


nginx version: nginx/1.5.8
built by gcc 4.1.2 20080704 (Red Hat 4.1.2-54)

Буду ждать любого отклика :)

function ngx_memcmp: ограничение по памяти. (no replies)

$
0
0
Привет всем.
Использую модуль nginx_push_stream_module для реализации push-механизма server -> browser.
В определенный момент, когда очередной клиент пытается встать на канал, начинает возвращаться ошибка: unable to allocate shared memory for channel

Вот кусок кода в модуле где он [nginx_push_stream_module] пытается выделить канал:

channel = ngx_http_push_stream_find_channel(cur->id, r->connection->log, mcf);
if (channel == NULL) {
// channel not found
ngx_shmtx_unlock(&shpool->mutex);
ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, "push stream module: unable to allocate shared memory for channel %s", cur->id->data);
return NGX_HTTP_INTERNAL_SERVER_ERROR;
}
Как видим, если ngx_http_push_stream_find_channel вернул NULL то вылетает эта ошибка.

В свою очередь ngx_http_push_stream_find_channel использует nginx функцию ngx_memn2cmp:

rc = ngx_memn2cmp(id->data, channel->id.data, id->len, channel->id.len);
if (rc == 0) {
return channel;
}
Та в свою очередь использует уже ngx_memcmp в самом nginx:

ngx_memn2cmp(u_char *s1, u_char *s2, size_t n1, size_t n2)
{
size_t n;
ngx_int_t m, z;

if (n1 <= n2) {
n = n1;
z = -1;

} else {
n = n2;
z = 1;
}

m = ngx_memcmp(s1, s2, n);

if (m || n1 == n2) {
return m;
}

return z;
}

Вопросы:
- в каком случае может не хватить памяти для ngx_memcmp?
- что она точно делает? как я понял, это сравнение памяти.
- сейчас каждый воркер потребляет 30 мб всего 16 воркеров.
- как настроить систему, nginx или и то и то, чтобы ошибка больше не проявлялалась

В системе еще 6 гб свободно памяти.

Ссылки на код модуля:

https://github.com/wandenberg/nginx-push-stream-module/blob/e802241cad3d5d1c1e63828f5f55a6f8a2f1be1e/src/ngx_http_push_stream_module_subscriber.c#L188

https://github.com/wandenberg/nginx-push-stream-module/blob/e802241cad3d5d1c1e63828f5f55a6f8a2f1be1e/src/ngx_http_push_stream_rbtree_util.c#L37

Re: function ngx memcmp: ограничение по памяти. (3 replies)

$
0
0
Hello!

On Tue, Oct 14, 2014 at 05:42:54AM -0400, JohnBat26 wrote:

> Привет всем.
> Использую модуль nginx_push_stream_module для реализации push-механизма
> server -> browser.
> В определенный момент, когда очередной клиент пытается встать на канал,
> начинает возвращаться ошибка: unable to allocate shared memory for channel
>
> Вот кусок кода в модуле где он [nginx_push_stream_module] пытается выделить
> канал:
>
> channel = ngx_http_push_stream_find_channel(cur->id,
> r->connection->log, mcf);
> if (channel == NULL) {
> // channel not found
> ngx_shmtx_unlock(&shpool->mutex);
> ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, "push stream
> module: unable to allocate shared memory for channel %s", cur->id->data);
> return NGX_HTTP_INTERNAL_SERVER_ERROR;
> }
> Как видим, если ngx_http_push_stream_find_channel вернул NULL то вылетает
> эта ошибка.

Судя по коду, текст ошибки - копипаста из другого места и/или
следствие замысловатого хода мысли автора модуля (что-нибудь вроде
"нет нужного id, зачит мы его удалили, значит у нас кончалась
память и мы его удалили").

Правильная причина указана в комментарии - канал с соответствующим
идентификатором не найден.

[...]

> Вопросы:
> - в каком случае может не хватить памяти для ngx_memcmp?
> - что она точно делает? как я понял, это сравнение памяти.

Да, это сравнение памяти. "Не хватить памяти" для сравнения - не
может, по определению. См. выше.

> - сейчас каждый воркер потребляет 30 мб всего 16 воркеров.
> - как настроить систему, nginx или и то и то, чтобы ошибка больше не
> проявлялалась

Беглый взгляд на код позволяет предположить, что размер
разделяемой памяти, которую использует модуль, настраивается с
помощью директивы push_stream_shared_memory_size. Где-то должна
быть и документация, вероятно.

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

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

misite1.ru открывается, subdomain.mysite1.ru нет, subdomain.mysite2.ru да (1 reply)

$
0
0
Здравствуйте.

На моём сервер работает несколько сайтов на nginx. Как серверы имён я использую сервис zonomi.com

Сейчас получается странная ситуация:
ping mysite1.com – OK
ping subdomain.mysite1.com – OK
ping mysite2.ru – OK
ping subdomain.mysite2.ru – unknown host

mysite1.com и subdomain.mysite1.com и subdomain.mysite2.ru сконфигурированы для wordpress, mysite2.ru – для drupal.

Вообще, в моём понимании, если пинг доходит до domainname.zone, то должен и до subdomain.domainname.zone и эта ситуация меня немного фрустрирует. В чём может быть дело?

unknown directive "server_names_hash_bucket_size:" (4 replies)

$
0
0
[!] root@UVM-PG-PROD-TEST at nginx >:/ sudo apt-get install nginx
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
nginx
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 0 B/384 kB of archives.
After this operation, 1 005 kB of additional disk space will be used.
Selecting previously unselected package nginx.
(Reading database ... 61375 files and directories currently installed.)
Preparing to unpack .../nginx_1.6.2-1~trusty_amd64.deb ...
----------------------------------------------------------------------

Thanks for using nginx!

Please find the official documentation for nginx here:
* http://nginx.org/en/docs/

Commercial subscriptions for nginx are available on:
* http://nginx.com/products/

----------------------------------------------------------------------
Unpacking nginx (1.6.2-1~trusty) ...
Processing triggers for ureadahead (0.100.0-16) ...
Setting up nginx (1.6.2-1~trusty) ...
nginx: [emerg] could not build the server_names_hash, you should
increase server_names_hash_bucket_size: 32
invoke-rc.d: initscript nginx, action "start" failed.

[!] root@UVM-PG-PROD-TEST at nginx >:/ sudo service nginx restart
* Restarting nginx nginx

nginx: [emerg] unknown
directive "server_names_hash_bucket_size:" in /etc/nginx/nginx.conf:43
nginx: configuration file /etc/nginx/nginx.conf test failed


Что ему нужно и как побороть?

apt-cache policy nginx
nginx:
Installed: 1.6.2-1~trusty
Candidate: 1.6.2-1~trusty
Version table:
*** 1.6.2-1~trusty 0
500 http://nginx.org/packages/ubuntu/ trusty/nginx amd64 Packages
100 /var/lib/dpkg/status
1.4.6-1ubuntu3.1 0
500 http://ru.archive.ubuntu.com/ubuntu/ trusty-security/main
amd64 Packages
500 http://ru.archive.ubuntu.com/ubuntu/ trusty-updates/main
amd64 Packages
1.4.6-1ubuntu3 0
500 http://ru.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages


nginx -V
nginx version: nginx/1.6.2
built by gcc 4.8.2 (Ubuntu 4.8.2-19ubuntu1)
TLS SNI support enabled
configure arguments: --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-proxy-temp-path=/var/cache/nginx/proxy_temp
--http-fastcgi-temp-path=/var/cache/nginx/fastcgi_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-http_realip_module
--with-http_addition_module --with-http_sub_module
--with-http_dav_module --with-http_flv_module --with-http_mp4_module
--with-http_gunzip_module --with-http_gzip_static_module
--with-http_random_index_module --with-http_secure_link_module
--with-http_stub_status_module --with-http_auth_request_module
--with-mail --with-mail_ssl_module --with-file-aio
--with-http_spdy_module --with-cc-opt='-g -O2 -fstack-protector
--param=ssp-buffer-size=4 -Wformat -Werror=format-security
-Wp,-D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-Bsymbolic-functions
-Wl,-z,relro -Wl,--as-needed' --with-ipv6

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

О целесообразности размещения кеша Nginx в tmpfs (Linux) (1 reply)

$
0
0
Привет сообществу!

Ребят, возник такой вопрос:


а есть ли профит от размещения кеша Nginx'а на tmpfs *в Linux *?


Дело в том, что когда-то, когда настраивал nginx с кешированием, натыкался
на старую рассылку, где ещё сам Игорь Сысоев рассказывал, что "*смысла в
этом нет, если только в кеш не производится много записи" **клац!
<http://markmail.org/message/hdjl6gawlvtsfwe5#query:+page:1+mid:hdjl6gawlvtsfwe5+state:results>*
Но там речь шла о FreeBSD, а не про Linux. А в каком-то другом (
очередном?:) ) холливаре про "nginx + RAM cache" тоже речь шла изначально
про фряху, где потом кто-то сказал что "да ерунда это все! в линухах tmpfs
работает как пологается", на что Игорь остановил - мол, "давайте
определимся, о какой оси речь идет: линуксы или фрибсд?" Жаль, но пруф уже
не найду..

Так вот. К чему это я всё: судя по всему, организация tmpfs во FreeBSD и
Linux'ах различается. И во фряхе размещать там кеш не всегда разумно. А как
с линуксами дело обстоит, может знает кто? Увы, у меня нет достаточных
знаний, чтобы философствовать на эту тему... но может у кого эмпирики
хватает.

purpose:

хочется отказаться от варниша в пользу nginx+cache. на данный момент
работает схема с варнишем спереди и nginx'ом в бэкенде.

Однако, при попытке убрать варниш, не было обнаружено какой-либо деградации
в синтетических тестбенчах (что весьма странно). То есть, выходило что
varnish не давал никакого профита (в синтетике) в сравнении с обычным
nginx'ом ? Поэтому встал вопрос "а можно ли вообще ускорить имеющийся
результат?" В ход пошли всякие коктейли из "pure nginx", "nginx+varnish",
"nginx+pagespeed", "nginx+cache".... <ещё с пару десятков комбинаций> ...
И вот, собсно, дошли до "nginx + tmpfs-cache + ..." Но, тк особого доверия
своим тестам нет никогда http://eax.me/benchmarks/, а теститься на
продакшенах бывает крайне дорого:) - хочется узнать мнения сообщества.

Спасибо!

P.s. Извините за графоманство - уж очень люблю это дело :D
_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru

auth_basic error nginx: [emerg] "auth_basic" directive is not allowed here in (3 replies)

$
0
0
http://nginx.org/ru/docs/http/ngx_http_auth_basic_module.html
По документации все должно работать вот так:

if ($host ~ "(dev|pma).example.com" ) {
auth_basic "Website development";
auth_basic_user_file /var/www/domain.com/www/dev/authfile;
}


Но оно выдает: auth_basic error nginx: [emerg] "auth_basic" directive is not allowed here in
В реалии приходится делать костыль

error_page 555 = @pass;
location @pass {
auth_basic "Unauthorized";
auth_basic_user_file /var/www/dev_htpasswd;
proxy_pass http://dev.zap-dom.ru:82;
proxy_set_header Host dev.zap-dom.ru;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
}

# В location / вписывем условие
if ($http_host ~* "^dev\..*\..{2,8}$"){
return 555;
}

ПОЧЕМУ ?

CVE-2014-3566, important SSLv3 vulnerability, known as Poodle. (5 replies)

$
0
0
Здравствуйте, All!

http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_protocols
Default: ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;

As most of you already know, there is an important SSLv3 vulnerability
(CVE-2014-3566 - see https://access.redhat.com/articles/1232123) ,
known as Poodle.

Возможно имеет смысл изменить значение по умолчанию для директивы
ssl_protocols, чтобы там было только "TLSv1 TLSv1.1 TLSv1.2"
или даже, только "TLSv1.1 TLSv1.2" ?

Чтобы nginx был "secure by default", прямо "из коробки".
А кому очень надо SSLv2 / SSLv3 / TLSv1 - смогут включить их вручную.

И второй вопрос, поскольку SSL уже фактически не осталось,
может быть имеет смысл все директивы ssl_******** переименовать
в tls_******** ? Так чтобы одновременно поддерживались и те и другие,
а со временем ssl_***** стали deprecated и потом removed ?

Аналогично, "ssl" => "tls" или "ssl" => "secure"
в параметре директивы listen.

"HTTPS" ведь расшифровывается как "HTTP Secure".

--
Best regards,
Gena

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

Неожиданное поведение location (2 replies)

$
0
0
Доброго времени суток!

Наткнулся на неожиданное поведение location в случае правила следующего
вида:

location ~ ^/lenin.. { return 302 http://www.test.com/leningrad/; }

Если пойти по ссылке вида http://www.test.com/leninzhiv/ то указанное выше
правило так же сработает, чего в свою очередь быть, мне кажется, не должно.

На всякий случай:

~# nginx -V
nginx version: nginx/1.7.6
built by gcc 4.8.2 (Ubuntu 4.8.2-19ubuntu1)
TLS SNI support enabled
configure arguments: --prefix=/usr/share --sbin-path=/usr/sbin
--conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log
--http-client-body-temp-path=/var/lib/nginx/body
--http-fastcgi-temp-path=/var/lib/nginx/fastcgi
--http-log-path=/var/log/nginx/access.log
--http-proxy-temp-path=/var/lib/nginx/proxy
--lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid
--without-http_uwsgi_module --without-http_scgi_module
--with-http_addition_module --with-http_gzip_static_module
--with-http_spdy_module --with-http_realip_module
--with-http_stub_status_module --with-http_ssl_module --with-ipv6
--add-module=/opt/src/ngx_pagespeed-release-1.9.32.1-beta

WBR,
Sergey 'dreik' Kolesnik
Skype: dreik.lc
Cell: +7 (921) 943-5237
_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru

SSL 3 is dead, killed by the POODLE attack (1 reply)

$
0
0
Кстати, Ivan Ristić из SSL Labs считает, что:

SSL 3 is dead, killed by the POODLE attack
https://community.qualys.com/blogs/securitylabs/2014/10/15/ssl-3-is-dead-killed-by-the-poodle-attack

И рекомендует всем системным администраторам:

[...] As a web site operator, you should disable SSL 3
on your servers as soon as possible. You need to do this
even if you support the most recent TLS version [...]

Кстати, на сайте nginx.com эта рекомендация уже выполнена:
https://www.ssllabs.com/ssltest/analyze.html?d=nginx.com

P.S.

Всеравно не понятно, почему нельзя в следующей версии
по умолчанию сделать ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

И в CHANGELOG написать о том, что протокол SSLv3 по умолчанию выключен.

"Администраторы всё-таки не дети", и читать CHANGELOG перед апгрейдом
они ведь умеют. Кому этот протокол действительно надо - включат обратно.

--
Best regards,
Gena

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

Отключение access_log для некоторых location. (no replies)

$
0
0
Добрый день.

Nginx 1.2.1 (Debian 7)

Иерархия access_log примерно такая:

http {
access_log /var/log/nginx/access.log benchmark_upstream;

server {
server_name site.com;

location /foo
{
access_log off;
}
access_log /var/log/nginx/site.access.log benchmark_upstream;
}
}

Хотелось бы, чтобы для /foo access-log не писался бы вообще, очевидно
access_log off я тут применил не верно, логи пишутся в site.access.log.
Как правильно отключить логи в location?

Спасибо.

--
WBR, Bogdan B. Rudas
_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru

location = / (no replies)

$
0
0
Всем привет.
Что я делаю не так:

server {
listen 80 default_server;

root /var/www;

location = / {
access_log /var/log/nginx/root_access.log main;
}
location / {
access_log /var/log/nginx/other_access.log main;
}
}

cat other_access.log
192.168.252.200 - - [19/Oct/2014:10:38:37 -0400] "GET / HTTP/1.1" 200 5 "-" "Gecko/20100101 Firefox/33.0" “-"

Запрос попал во второй location, но согласно документации должен был попасть в первый.
Почему так ?

nginx -v
nginx version: nginx/1.6.2
CentOS 6.5

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

location = / (no replies)

$
0
0
Всем привет.
Что я делаю не так:

server {
listen 80 default_server;

root /var/www;

location = / {
access_log /var/log/nginx/root_access.log main;
}
location / {
access_log /var/log/nginx/other_access.log main;
}
}

cat other_access.log
192.168.252.200 - - [19/Oct/2014:10:38:37 -0400] "GET / HTTP/1.1" 200 5 "-" "Gecko/20100101 Firefox/33.0" “-"

Запрос попал во второй location, но согласно документации должен был попасть в первый.
Почему так ?

nginx -v
nginx version: nginx/1.6.2
CentOS 6.5

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

uid_got uid_set работают? (no replies)

$
0
0
Решил ввести систему отсекания ботов на уровне нгинкса... заморачиватся с пересборкой testcookie_module не решился.
userid on;
if ($uid_got = "qqk_i=5876790119") {
return 404;
}
и решил не выдавать плюшки, но меня не выбросило на 404, почему?
естественно это в конфигах сервера.

оптимизация client_body на медленной файловой системе (1 reply)

$
0
0
Какие оптимизации рекомендованы при использовании client_body_in_file_only on;?
Надо разобраться с минимизацией обращений к файловой системе и реиспользованию
HTTP подключения с клиентом и бэкэндом (proxy_pass), на который идет колбек.

Условия: IO никакой (EBS), размер файла в среднем 10MB, количество файлов
для загрузки - 10, от одного клиента. Текущие настройки:

location /upload {
sendfile on;
limit_except POST { deny all; }
keepalive_timeout 300s;
client_body_temp_path /media/tmp/;
client_body_in_file_only on;
client_body_buffer_size 128K;
client_max_body_size 100M;

proxy_pass_request_headers on;
proxy_set_header X-File $request_body_file;
proxy_set_body off;
proxy_redirect off;
proxy_pass https://***/server_callback
}

Смотрю в сторону client_body_in_single_buffer, tcp_nodelay, tcp_nopush, sendfile_max_chunk

О системе Linux 3.10, Red Hat 4.8.2-7.

Анатолий
_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru
Viewing all 3102 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>