<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Nginx Forum</title>
<description>Mailing List Integration and More!</description><link>http://forum.nginx.org/index.php</link><lastBuildDate>Fri, 24 May 2013 23:07:16 -0400</lastBuildDate>
<generator>Phorum 5.2.16</generator>
<item>
<guid>http://forum.nginx.org/read.php?2,239528,239528#msg-239528</guid>
<title>Performance trouble after migration Squeeze to Wheezy (no replies)</title><link>http://forum.nginx.org/read.php?2,239528,239528#msg-239528</link><description><![CDATA[Hello,<br /><br />First of all I need to emphasize the fact that I know WHeezy is not yet<br />supported.<br />What I am trying to determine how WHeezy could impact Nginx (compiled for<br />Squeeze) performance.<br /><br />Since I made the upgrade, big files are being served in a slow fashion<br />(~200 kiB/s).<br />The directory serving them is configured with AIO and worked perfectly<br />before system changes.<br /><br />I know Sergey listed some changes in the<br />dependencieshttp://mailman.nginx.org/mailman/listinfo/nginx,<br />but what precisely would explain such a slow-down?<br />Is there a defect somewhere that I can work on or just be patient and wait<br />for the release of the Wheezy build of Nginx?<br /><br />Thanks,<br />---<br />*B. R.*<br />_______________________________________________<br />nginx mailing list<br />nginx@nginx.org<br />http://mailman.nginx.org/mailman/listinfo/nginx]]></description>
<dc:creator>B.R.</dc:creator>
<category>Nginx Mailing List - English</category><pubDate>Fri, 24 May 2013 17:18:00 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?29,239526,239526#msg-239526</guid>
<title>[nginx] Xslt: xslt_last_modified directive. (no replies)</title><link>http://forum.nginx.org/read.php?29,239526,239526#msg-239526</link><description><![CDATA[details: http://hg.nginx.org/nginx/rev/2139768ee404<br />branches:<br />changeset: 5230:2139768ee404<br />user: Maxim Dounin &lt;mdounin@mdounin.ru&gt;<br />date: Fri May 24 22:28:09 2013 +0400<br />description:<br />Xslt: xslt_last_modified directive.<br /><br />Directive is similar to ssi_last_modified and sub_filter_last_modified<br />directives introduced by previous commits.<br /><br />diffstat:<br /><br />src/http/modules/ngx_http_xslt_filter_module.c | 26 ++++++++++++++++++++++----<br />1 files changed, 22 insertions(+), 4 deletions(-)<br /><br />diffs (72 lines):<br /><br />diff --git a/src/http/modules/ngx_http_xslt_filter_module.c b/src/http/modules/ngx_http_xslt_filter_module.c<br />--- a/src/http/modules/ngx_http_xslt_filter_module.c<br />+++ b/src/http/modules/ngx_http_xslt_filter_module.c<br />@@ -58,6 +58,7 @@ typedef struct {<br />ngx_hash_t types;<br />ngx_array_t *types_keys;<br />ngx_array_t *params; /* ngx_http_xslt_param_t */<br />+ ngx_flag_t last_modified;<br />} ngx_http_xslt_filter_loc_conf_t;<br /><br /><br />@@ -150,6 +151,13 @@ static ngx_command_t ngx_http_xslt_filt<br />offsetof(ngx_http_xslt_filter_loc_conf_t, types_keys),<br />&amp;ngx_http_xslt_default_types[0] },<br /><br />+ { ngx_string(&quot;xslt_last_modified&quot;),<br />+ NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG,<br />+ ngx_conf_set_flag_slot,<br />+ NGX_HTTP_LOC_CONF_OFFSET,<br />+ offsetof(ngx_http_xslt_filter_loc_conf_t, last_modified),<br />+ NULL },<br />+<br />ngx_null_command<br />};<br /><br />@@ -300,9 +308,10 @@ static ngx_int_t<br />ngx_http_xslt_send(ngx_http_request_t *r, ngx_http_xslt_filter_ctx_t *ctx,<br />ngx_buf_t *b)<br />{<br />- ngx_int_t rc;<br />- ngx_chain_t out;<br />- ngx_pool_cleanup_t *cln;<br />+ ngx_int_t rc;<br />+ ngx_chain_t out;<br />+ ngx_pool_cleanup_t *cln;<br />+ ngx_http_xslt_filter_loc_conf_t *conf;<br /><br />ctx-&gt;done = 1;<br /><br />@@ -327,8 +336,13 @@ ngx_http_xslt_send(ngx_http_request_t *r<br />r-&gt;headers_out.content_length = NULL;<br />}<br /><br />- ngx_http_clear_last_modified(r);<br />ngx_http_clear_etag(r);<br />+<br />+ conf = ngx_http_get_module_loc_conf(r, ngx_http_xslt_filter_module);<br />+<br />+ if (!conf-&gt;last_modified) {<br />+ ngx_http_clear_last_modified(r);<br />+ }<br />}<br /><br />rc = ngx_http_next_header_filter(r);<br />@@ -1058,6 +1072,8 @@ ngx_http_xslt_filter_create_conf(ngx_con<br />* conf-&gt;params = NULL;<br />*/<br /><br />+ conf-&gt;last_modified = NGX_CONF_UNSET;<br />+<br />return conf;<br />}<br /><br />@@ -1088,6 +1104,8 @@ ngx_http_xslt_filter_merge_conf(ngx_conf<br />return NGX_CONF_ERROR;<br />}<br /><br />+ ngx_conf_merge_value(conf-&gt;last_modified, prev-&gt;last_modified, 0);<br />+<br />return NGX_CONF_OK;<br />}<br /><br /><br />_______________________________________________<br />nginx-devel mailing list<br />nginx-devel@nginx.org<br />http://mailman.nginx.org/mailman/listinfo/nginx-devel]]></description>
<dc:creator>Maxim Dounin</dc:creator>
<category>Nginx Development</category><pubDate>Fri, 24 May 2013 14:34:01 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?29,239525,239525#msg-239525</guid>
<title>[nginx] Sub filter: sub_filter_last_modified directive. (no replies)</title><link>http://forum.nginx.org/read.php?29,239525,239525#msg-239525</link><description><![CDATA[details: http://hg.nginx.org/nginx/rev/4c1a604b0285<br />branches:<br />changeset: 5229:4c1a604b0285<br />user: Maxim Dounin &lt;mdounin@mdounin.ru&gt;<br />date: Fri May 24 22:27:30 2013 +0400<br />description:<br />Sub filter: sub_filter_last_modified directive.<br /><br />Directive is similar to ssi_last_modified introduced by previous commit.<br /><br />Patch by Alexey Kolpakov.<br /><br />diffstat:<br /><br />src/http/modules/ngx_http_sub_filter_module.c | 15 ++++++++++++++-<br />1 files changed, 14 insertions(+), 1 deletions(-)<br /><br />diffs (54 lines):<br /><br />diff --git a/src/http/modules/ngx_http_sub_filter_module.c b/src/http/modules/ngx_http_sub_filter_module.c<br />--- a/src/http/modules/ngx_http_sub_filter_module.c<br />+++ b/src/http/modules/ngx_http_sub_filter_module.c<br />@@ -17,6 +17,7 @@ typedef struct {<br />ngx_hash_t types;<br /><br />ngx_flag_t once;<br />+ ngx_flag_t last_modified;<br /><br />ngx_array_t *types_keys;<br />} ngx_http_sub_loc_conf_t;<br />@@ -89,6 +90,13 @@ static ngx_command_t ngx_http_sub_filte<br />offsetof(ngx_http_sub_loc_conf_t, once),<br />NULL },<br /><br />+ { ngx_string(&quot;sub_filter_last_modified&quot;),<br />+ NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG,<br />+ ngx_conf_set_flag_slot,<br />+ NGX_HTTP_LOC_CONF_OFFSET,<br />+ offsetof(ngx_http_sub_loc_conf_t, last_modified),<br />+ NULL },<br />+<br />ngx_null_command<br />};<br /><br />@@ -167,8 +175,11 @@ ngx_http_sub_header_filter(ngx_http_requ<br /><br />if (r == r-&gt;main) {<br />ngx_http_clear_content_length(r);<br />- ngx_http_clear_last_modified(r);<br />ngx_http_clear_etag(r);<br />+<br />+ if (!slcf-&gt;last_modified) {<br />+ ngx_http_clear_last_modified(r);<br />+ }<br />}<br /><br />return ngx_http_next_header_filter(r);<br />@@ -674,6 +685,7 @@ ngx_http_sub_create_conf(ngx_conf_t *cf)<br />*/<br /><br />slcf-&gt;once = NGX_CONF_UNSET;<br />+ slcf-&gt;last_modified = NGX_CONF_UNSET;<br /><br />return slcf;<br />}<br />@@ -687,6 +699,7 @@ ngx_http_sub_merge_conf(ngx_conf_t *cf,<br /><br />ngx_conf_merge_value(conf-&gt;once, prev-&gt;once, 1);<br />ngx_conf_merge_str_value(conf-&gt;match, prev-&gt;match, &quot;&quot;);<br />+ ngx_conf_merge_value(conf-&gt;last_modified, prev-&gt;last_modified, 0);<br /><br />if (conf-&gt;value.value.data == NULL) {<br />conf-&gt;value = prev-&gt;value;<br /><br />_______________________________________________<br />nginx-devel mailing list<br />nginx-devel@nginx.org<br />http://mailman.nginx.org/mailman/listinfo/nginx-devel]]></description>
<dc:creator>Maxim Dounin</dc:creator>
<category>Nginx Development</category><pubDate>Fri, 24 May 2013 14:34:01 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?29,239524,239524#msg-239524</guid>
<title>[nginx] SSI: ssi_last_modified directive. (no replies)</title><link>http://forum.nginx.org/read.php?29,239524,239524#msg-239524</link><description><![CDATA[details: http://hg.nginx.org/nginx/rev/cbd4bbe976d4<br />branches:<br />changeset: 5228:cbd4bbe976d4<br />user: Maxim Dounin &lt;mdounin@mdounin.ru&gt;<br />date: Fri May 24 22:27:23 2013 +0400<br />description:<br />SSI: ssi_last_modified directive.<br /><br />The &quot;ssi_last_modified&quot; directive allows to preserve Last-Modified header<br />in SSI responses. The directive is similar to SSILastModified one available<br />in Apache:<br /><br />http://httpd.apache.org/docs/2.4/mod/mod_include.html#ssilastmodified<br /><br />Patch by Alexey Kolpakov.<br /><br />diffstat:<br /><br />src/http/modules/ngx_http_ssi_filter_module.c | 15 ++++++++++++++-<br />1 files changed, 14 insertions(+), 1 deletions(-)<br /><br />diffs (55 lines):<br /><br />diff --git a/src/http/modules/ngx_http_ssi_filter_module.c b/src/http/modules/ngx_http_ssi_filter_module.c<br />--- a/src/http/modules/ngx_http_ssi_filter_module.c<br />+++ b/src/http/modules/ngx_http_ssi_filter_module.c<br />@@ -21,6 +21,7 @@ typedef struct {<br />ngx_flag_t enable;<br />ngx_flag_t silent_errors;<br />ngx_flag_t ignore_recycled_buffers;<br />+ ngx_flag_t last_modified;<br /><br />ngx_hash_t types;<br /><br />@@ -162,6 +163,13 @@ static ngx_command_t ngx_http_ssi_filte<br />offsetof(ngx_http_ssi_loc_conf_t, types_keys),<br />&amp;ngx_http_html_default_types[0] },<br /><br />+ { ngx_string(&quot;ssi_last_modified&quot;),<br />+ NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG,<br />+ ngx_conf_set_flag_slot,<br />+ NGX_HTTP_LOC_CONF_OFFSET,<br />+ offsetof(ngx_http_ssi_loc_conf_t, last_modified),<br />+ NULL },<br />+<br />ngx_null_command<br />};<br /><br />@@ -359,9 +367,12 @@ ngx_http_ssi_header_filter(ngx_http_requ<br /><br />if (r == r-&gt;main) {<br />ngx_http_clear_content_length(r);<br />- ngx_http_clear_last_modified(r);<br />ngx_http_clear_accept_ranges(r);<br />ngx_http_clear_etag(r);<br />+<br />+ if (!slcf-&gt;last_modified) {<br />+ ngx_http_clear_last_modified(r);<br />+ }<br />}<br /><br />return ngx_http_next_header_filter(r);<br />@@ -2878,6 +2889,7 @@ ngx_http_ssi_create_loc_conf(ngx_conf_t<br />slcf-&gt;enable = NGX_CONF_UNSET;<br />slcf-&gt;silent_errors = NGX_CONF_UNSET;<br />slcf-&gt;ignore_recycled_buffers = NGX_CONF_UNSET;<br />+ slcf-&gt;last_modified = NGX_CONF_UNSET;<br /><br />slcf-&gt;min_file_chunk = NGX_CONF_UNSET_SIZE;<br />slcf-&gt;value_len = NGX_CONF_UNSET_SIZE;<br />@@ -2896,6 +2908,7 @@ ngx_http_ssi_merge_loc_conf(ngx_conf_t *<br />ngx_conf_merge_value(conf-&gt;silent_errors, prev-&gt;silent_errors, 0);<br />ngx_conf_merge_value(conf-&gt;ignore_recycled_buffers,<br />prev-&gt;ignore_recycled_buffers, 0);<br />+ ngx_conf_merge_value(conf-&gt;last_modified, prev-&gt;last_modified, 0);<br /><br />ngx_conf_merge_size_value(conf-&gt;min_file_chunk, prev-&gt;min_file_chunk, 1024);<br />ngx_conf_merge_size_value(conf-&gt;value_len, prev-&gt;value_len, 255);<br /><br />_______________________________________________<br />nginx-devel mailing list<br />nginx-devel@nginx.org<br />http://mailman.nginx.org/mailman/listinfo/nginx-devel]]></description>
<dc:creator>Maxim Dounin</dc:creator>
<category>Nginx Development</category><pubDate>Fri, 24 May 2013 14:34:01 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?2,239522,239522#msg-239522</guid>
<title>Rewriting and proxy problem (1 reply)</title><link>http://forum.nginx.org/read.php?2,239522,239522#msg-239522</link><description><![CDATA[H folks!<br /><br />I am completeley newbie to nginx<br /><br />I have the following config<br /><br /># Forward request to /demo to tomcat. This is for<br /># the BigBlueButton api demos.<br />location /demo {<br />rewrite ^ /upvc;<br />proxy_pass http://127.0.0.1:8080;<br />proxy_redirect default;<br />proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br /><br /># Allow 30M uploaded presentation document.<br />client_max_body_size 30m;<br />client_body_buffer_size 128k;<br /><br />proxy_connect_timeout 90;<br />proxy_send_timeout 90;<br />proxy_read_timeout 90;<br /><br />proxy_buffer_size 4k;<br />proxy_buffers 4 32k;<br />proxy_busy_buffers_size 64k;<br />proxy_temp_file_write_size 64k;<br /><br />include fastcgi_params;<br />}<br /><br /><br />location /upvc {<br />alias /var/lib/tomcat6/webapps/demo;<br />index demo3.jsp;<br />expires 1m;<br />}<br /><br /><br />Rewrite is working but nginx is not. proxying to tomcat, because of that<br />returns the jsp file as a plain text file.<br /><br />Please could you help me?<br /><br />Thanks in advance!<br />--<br />--<br />Sergio Belkin http://www.sergiobelkin.com<br />Watch More TV http://sebelk.blogspot.com<br />LPIC-2 Certified - http://www.lpi.org<br />_______________________________________________<br />nginx mailing list<br />nginx@nginx.org<br />http://mailman.nginx.org/mailman/listinfo/nginx]]></description>
<dc:creator>Sergio Belkin</dc:creator>
<category>Nginx Mailing List - English</category><pubDate>Fri, 24 May 2013 15:08:01 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?21,239518,239518#msg-239518</guid>
<title>прошу помочь с rewrite (1 reply)</title><link>http://forum.nginx.org/read.php?21,239518,239518#msg-239518</link><description><![CDATA[Добрый день.<br /><br />Прошу помочь с конфигурированием, не получается самому написать.<br />Была программа на php, например login.php . Теперь ее переписали и она<br />должна работать с другого апстрима и там иметь адрес /account/login. Но<br />убрать ссылки на login.php не представляется возможным, и на него идут как<br />GET так и POST запросы. Поэтому идеальное решение было бы такое (только вот<br />не понимаю как написать)<br /><br />location /login.php {<br />proxy_pass http://newupstream;<br />proxy_redirect off;<br />proxy_set_header Host $host;<br />proxy_set_header Via $http_via;<br />proxy_set_header X-Real-IP $remote_addr;<br />proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br />rewrite_log on;<br /><br />rewrite login.php =&gt; /account/login (пишу смысл, так не получается<br />написать правильно :( . Ну или работает GET вариант, а POST не получается<br />никак)<br />}<br /><br />Заранее спасибо.<br />_______________________________________________<br />nginx-ru mailing list<br />nginx-ru@nginx.org<br />http://mailman.nginx.org/mailman/listinfo/nginx-ru]]></description>
<dc:creator>Nikolay Grebnev</dc:creator>
<category>Nginx Mailing List - Russian</category><pubDate>Fri, 24 May 2013 13:06:01 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?21,239516,239516#msg-239516</guid>
<title>Re: добавочный файл в http addition module (no replies)</title><link>http://forum.nginx.org/read.php?21,239516,239516#msg-239516</link><description><![CDATA[On Friday 24 May 2013 18:26:13 romanvin wrote:<br />&gt; Есть ли вариант, используя модуль ngx_http_addition_module, указывать в<br />&gt; значении URI веб адрес (URL, например http/site.ru/pluscode.html) либо<br />&gt; задавать путь к добавочному файлу который лежал бы в универсальном<br />&gt; хранилище, например в /root/nginx/pluscode.html<br />&gt;<br />&gt; Сейчас как я понимаю, он может лежать только в директории сайта вида<br />&gt; /home/user/public_html/pluscode.html<br />&gt; и ни в каком другом месте.<br />&gt;<br />&gt; варианты вида<br />&gt; add_before_body http://site.ru/pluscode.html<br />&gt; add_before_body /home/nginx/pluscode.html<br />&gt;<br />&gt; не срабатывают.<br />&gt;<br /><br />Почему?<br /><br />location = /pluscode.html {<br />internal;<br />root /home/nginx;<br />}<br /><br />--<br />Валентин Бартенев<br />http://nginx.org/en/donation.html<br />_______________________________________________<br />nginx-ru mailing list<br />nginx-ru@nginx.org<br />http://mailman.nginx.org/mailman/listinfo/nginx-ru]]></description>
<dc:creator>Валентин Бартенев</dc:creator>
<category>Nginx Mailing List - Russian</category><pubDate>Fri, 24 May 2013 10:34:02 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?21,239515,239515#msg-239515</guid>
<title>добавочный файл в http_addition_module (no replies)</title><link>http://forum.nginx.org/read.php?21,239515,239515#msg-239515</link><description><![CDATA[Есть ли вариант, используя модуль ngx_http_addition_module, указывать в значении URI веб адрес (URL, например http/site.ru/pluscode.html) либо задавать путь к добавочному файлу который лежал бы в универсальном хранилище, например в /root/nginx/pluscode.html<br /><br />Сейчас как я понимаю, он может лежать только в директории сайта вида<br />/home/user/public_html/pluscode.html<br />и ни в каком другом месте.<br /><br />варианты вида<br />add_before_body http://site.ru/pluscode.html<br />add_before_body /home/nginx/pluscode.html<br /><br />не срабатывают.]]></description>
<dc:creator>romanvin</dc:creator>
<category>Nginx Mailing List - Russian</category><pubDate>Fri, 24 May 2013 10:26:13 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?11,239512,239512#msg-239512</guid>
<title>Insert Ad's in free internet traffic. (no replies)</title><link>http://forum.nginx.org/read.php?11,239512,239512#msg-239512</link><description><![CDATA[Hi folks,<br /><br />I don't mean to sound evil. I am trying to give free internet to my users and want to insert ad's in the internet traffic. Hoping the revenue will help support free internet. I want to use Nginx as a Cache Proxy instead of Squid. I came across mod_layout in Apache, which I understand, inserts ad's in Header and Footer dynamically. I like Nginx as it feels faster than Apache.<br /><br />Would appreciate any advice.<br /><br />Cheers]]></description>
<dc:creator>hdavy2002</dc:creator>
<category>How to...</category><pubDate>Fri, 24 May 2013 09:49:22 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?29,239511,239511#msg-239511</guid>
<title>Socket leak (3 replies)</title><link>http://forum.nginx.org/read.php?29,239511,239511#msg-239511</link><description><![CDATA[Hi all<br /><br />I have been seeing slow but steady socket leak in nginx ever since I<br />upgraded from 1.0.5 to 1.2.6. I have my custom module in nginx which I was<br />sure what was the leak. This is how I went about investigating:<br />1. Configure nginx with one worker<br />2. strace on the worker process, tracing<br />read/readv/write/writev/close/shutdown calls<br />3. Every now and then, for all the open fds (from ls -l /proc/&lt;pid&gt;/fd),<br />check the socket that is not available in netstat -pane<br />4. What I saw was, the leaking socket always had the last operation as<br />writev which returned an error.<br />5. Increased the nginx log level to info and verified that nginx was<br />getting ECONNRESET or EPIPE on writev failure. Which was OK.<br />6. Traced back in code to see how it is handled, the error translates to<br />CHAIN_ERROR and eventually causes ngx_http_finalize_request to be called.<br />This in turn calls ngx_http_terminate_request.<br /><br />However, in this function, the request is not terminated if<br />r-&gt;write_event_handler is set. This seems to be set if the request handler<br />is a user module. I think the rationale for the check is, if there is a<br />module who is handling the request, dont terminate yet, wait for a write<br />event on the socket and then terminate it (which is why I thought it is<br />setting r-&gt;write_event_handler to ngx_http_terminate_handler).<br /><br />I tried to repro this w/ empty_gif_handler however, it sends header and<br />body in one call to writev which I cant get to fail in my test environment.<br />To reproduce the bug, if I replace the call to ngx_http_send_response with<br />ngx_http_send_header and ngx_http_output_filter (as used by ngx_upstream or<br />other modules which dont have the headers and body together), I could<br />reproduce the leak. I have a client that sends a request and closes the<br />socket immediately, nginx sees the error, prints the info log, and then it<br />doesnt close the socket.<br /><br />I have a small patch attached, the fix I did is basically saying that if<br />there is a connection error, there is no point setting write_event_handler<br />as there wont be any activity on the socket, so just terminate it<br />immediately.<br /><br />I could be very wrong in the understanding of the code flow. My patch just<br />fixes this and I am not very sure if this is the right fix. Please let me<br />know.<br /><br />I will try to add a testcase to reproduce this in the nginx test framework.<br /><br />Thank you for your patience.<br /><br />Regards<br />+Fasih<br />diff --git a/nginx-1.2.6/src/http/ngx_http_request.c b/nginx-1.2.6/src/http/ngx_http_request.c<br />--- a/nginx-1.2.6/src/http/ngx_http_request.c<br />+++ b/nginx-1.2.6/src/http/ngx_http_request.c<br />@@ -2172,7 +2172,7 @@ ngx_http_terminate_request(ngx_http_request_t *r, ngx_int_t rc)<br />&quot;http terminate cleanup count:%d blk:%d&quot;,<br />mr-&gt;count, mr-&gt;blocked);<br /><br />- if (mr-&gt;write_event_handler) {<br />+ if (mr-&gt;write_event_handler &amp;&amp; !c-&gt;error) {<br /><br />if (mr-&gt;blocked) {<br />return;<br />_______________________________________________<br />nginx-devel mailing list<br />nginx-devel@nginx.org<br />http://mailman.nginx.org/mailman/listinfo/nginx-devel]]></description>
<dc:creator>faskiri.devel</dc:creator>
<category>Nginx Development</category><pubDate>Fri, 24 May 2013 12:52:01 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?11,239508,239508#msg-239508</guid>
<title>Removing port from fastcgi redirects (no replies)</title><link>http://forum.nginx.org/read.php?11,239508,239508#msg-239508</link><description><![CDATA[I'm having an issue where some redirects on a website have the proxy-pass port included, rendering them useless. My configuration is as follows:<br /><br />Physical server 1:<br /><br />server {<br />server_name example.com www.example.com;<br /><br />location / {<br />proxy_pass http://1.1.1.1:50493;<br />proxy_set_header X-Real-IP $remote_addr;<br />proxy_set_header Host &quot;example.com&quot;;<br />}<br />}<br /><br /><br /><br />Physical Server 2:<br /><br />server {<br />listen 50493;<br />server_name example.com www.example.com;<br /><br />set_real_ip_from 1.1.1.1;<br /><br />root /var/www/example.com;<br />index index.php index.htm index.html;<br /><br />location / {<br />if ($http_host !~ &quot;^example.com&quot;){<br />set $rule_0 1$rule_0;<br />}<br />if ($rule_0 = &quot;1&quot;){<br />rewrite ^/(.*) http://example.com/$1 permanent;<br />}<br />rewrite /[^/]+/([0-9]+)-[^/]+.html http://example.com/showthread.php?t=$1 permanent;<br />}<br /><br />location ~ .php$ {<br />fastcgi_pass 127.0.0.1:9000;<br />fastcgi_index index.php;<br />fastcgi_param SCRIPT_FILENAME /var/www/example.com$fastcgi_script_name;<br />include fastcgi_params;<br />fastcgi_read_timeout 600s;<br />fastcgi_buffer_size 512k;<br />fastcgi_buffers 16 512k;<br />}<br />}<br /><br /><br />Generally, browsing works fine. The site is browsable as one expects. However some links that redirect (eg. after a login action), redirect to a link with the port 50493 included. So we get http://example.com:50493/index.php for example. That will not work. My question is, how do I remove the port in such cases?]]></description>
<dc:creator>zibralis</dc:creator>
<category>How to...</category><pubDate>Fri, 24 May 2013 07:34:02 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?21,239503,239503#msg-239503</guid>
<title>nginx под Windows 8 (1 reply)</title><link>http://forum.nginx.org/read.php?21,239503,239503#msg-239503</link><description><![CDATA[Пытаюсь запустить nginx 1.4.1 на Windows 8. Выдает ошибку в логах:<br /><br />2013/05/24 13:31:43 [emerg] 3272#2744: CreateFile() &quot;C:\Users\Администратор\Downloads\nginx-1.4.1/conf/nginx.conf&quot; failed (1113: No mapping for the Unicode character exists in the target multi-byte code page)]]></description>
<dc:creator>fynloski</dc:creator>
<category>Nginx Mailing List - Russian</category><pubDate>Fri, 24 May 2013 09:14:01 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?18,239497,239497#msg-239497</guid>
<title>Glamical for Eye Bags Treatment with Natural Herbal Product (no replies)</title><link>http://forum.nginx.org/read.php?18,239497,239497#msg-239497</link><description><![CDATA[Say no to eye bags and give your eyes a healthy shine by regularly using our herbal tablets known as Glamical.<br /><br /><br /><br />http://www.herbal-care-products.com/eye-bags]]></description>
<dc:creator>alenclerk</dc:creator>
<category>German Forum</category><pubDate>Fri, 24 May 2013 02:27:46 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?2,239495,239495#msg-239495</guid>
<title>[ANN] ngx_openresty devel version 1.2.8.5 released (no replies)</title><link>http://forum.nginx.org/read.php?2,239495,239495#msg-239495</link><description><![CDATA[Hello guys!<br /><br />I am happy to announce that the new development version of<br />ngx_openresty, 1.2.8.5, is now released:<br /><br />http://openresty.org/#Download<br /><br />Special thanks go to all our contributors and users for helping make<br />this release happen!<br /><br />Below is the complete change log for this release, as compared to the<br />last (devel) release, 1.2.8.3:<br /><br />* upgraded LuaNginxModule to 0.8.2.<br /><br />* feature: added &quot;ngx.HTTP_MKCOL&quot;, &quot;ngx.HTTP_COPY&quot;,<br />&quot;ngx.HTTP_MOVE&quot;, and other WebDAV request method constants;<br />also added corresponding support to ngx.req.set_method and<br />ngx.location.capture. thanks Adallom Roy for the patch.<br /><br />* feature: allow injecting new user Lua APIs (and overriding<br />existing Lua APIs) in the &quot;ngx&quot; table.<br /><br />* bugfix: ngx.req.set_body_file() always enabled Direct I/O<br />which caused the alert message &quot;fcntl(O_DIRECT) ... Invalid<br />argument&quot; in error logs on file systems lacking the Direct<br />I/O support. thanks Matthieu Tourne for reporting this<br />issue.<br /><br />* bugfix: buffer corruption might happen in<br />ngx.req.set_body_file() when Nginx upstream modules were<br />used later because ngx.req.set_body_file() incorrectly set<br />&quot;r-&gt;request_body-&gt;buf&quot; to the in-file buffer which could get<br />reused by &quot;ngx_http_upstream&quot; for its own purposes.<br /><br />* bugfix: no longer automatically turn underscores (_) to<br />dashes (-) in header names for ngx.req.set_header and<br />ngx.req.clear_header. thanks aviramc for the report.<br /><br />* bugfix: segmentation fault might happen in nginx 1.4.x when<br />calling ngx.req.set_header on the &quot;Cookie&quot; request headers<br />because recent versions of Nginx no longer always initialize<br />&quot;r-&gt;headers_in.cookies&quot;. thanks Rob W for reporting this<br />issue.<br /><br />* bugfix: fixed the C compiler warning &quot;argument 'nret' might<br />be clobbered by 'longjmp' or 'vfork'&quot; when compiling with<br />Ubuntu 13.04's gcc 4.7.3. thanks jacky and Rajeev's reports.<br /><br />* bugfix: temporary memory leaks might happen when using<br />ngx.escape_uri, ngx.unescape_uri, ngx.quote_sql_str,<br />ngx.decode_base64, and ngx.encode_base64 in tight Lua loops<br />because we allocated memory in nginx's request memory pool<br />for these methods.<br /><br />* optimize: ngx.escape_uri now runs faster when the input<br />string contains no special bytes to be escaped.<br /><br />* testing: added custom test scaffold t::TestNginxLua which<br />subclasses Test::Nginx::Socket. it supports the environment<br />&quot;TEST_NGINX_INIT_BY_LUA&quot; which can be used to add more<br />custom Lua code to the value of the init_by_lua directive in<br />the Nginx configuration.<br /><br />* upgraded SrcacheNginxModule to 0.21.<br /><br />* bugfix: responses with a status code smaller than all the<br />status codes specified in the srcache_store_statuses<br />directive were not skipped as expected. thanks Lanshun Zhou<br />for the patch.<br /><br />* feature: applied the invalid_referer_hash patch to the Nginx<br />core to make the $invalid_referer variable accessible in<br />embedded dynamic languages like Perl and Lua. thanks Fry-kun for<br />requesting this.<br /><br />* updated the dtrace patch for the Nginx core.<br /><br />* print out more info about the Nginx in-file bufs in the<br />tapset function &quot;ngx_chain_dump&quot;.<br /><br />The HTML version of the change log with lots of helpful hyper-links<br />can be browsed here:<br /><br />http://openresty.org/#ChangeLog1002008<br /><br />OpenResty (aka. ngx_openresty) is a full-fledged web application<br />server by bundling the standard Nginx core, lots of 3rd-party Nginx<br />modules and Lua libraries, as well as most of their external<br />dependencies. See OpenResty's homepage for details:<br /><br />http://openresty.org/<br /><br />We have been running extensive testing on our Amazon EC2 test cluster<br />and ensure that all the components (including the Nginx core) play<br />well together. The latest test report can always be found here:<br /><br />http://qa.openresty.org<br /><br />Have fun!<br />-agentzh<br /><br />_______________________________________________<br />nginx mailing list<br />nginx@nginx.org<br />http://mailman.nginx.org/mailman/listinfo/nginx]]></description>
<dc:creator>agentzh</dc:creator>
<category>Nginx Mailing List - English</category><pubDate>Thu, 23 May 2013 21:22:01 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?2,239494,239494#msg-239494</guid>
<title>proxy only certain assets based on host header? (2 replies)</title><link>http://forum.nginx.org/read.php?2,239494,239494#msg-239494</link><description><![CDATA[We're trying to proxy only certain assets like png|jpg|css only when the host header is a certain DNS name. I tried to do this in the proxy.conf file using something the example below but it doesnt like the if statement. Is there a way to have nginx do what I am looking for?<br /><br /><br />if ($http_host = dnsname.com) {<br />location ~ ^/(stylesheets|images|javascripts|tools|flash|components)/ {<br />proxy_pass http://assethost<br />}<br />}]]></description>
<dc:creator>amagad</dc:creator>
<category>Nginx Mailing List - English</category><pubDate>Fri, 24 May 2013 09:08:02 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?9,239493,239493#msg-239493</guid>
<title>Nginx &amp; Wordpress (1 reply)</title><link>http://forum.nginx.org/read.php?9,239493,239493#msg-239493</link><description><![CDATA[Hello!<br /><br />I'm having a hard time with nginx &amp; wordpress. Specifically I installed/configured WP on http://www.busybabybook.com/blog/ and all seems to be ok EXCEPT for the fact that in the wp-admin/ I can't see: Media, Posts return an &quot;Invalid post type&quot;, there are no Pages (but in fact I have 2: Contact and About).<br /><br />Also, i would like to redirect www.busybabybook.com to www.busybabybook.com/blog/ but i've got no idea how to make this work without any problems in nginx.<br /><br />This is my vhost:<br />http://pastebin.com/ugvLMQYd<br /><br />Thank you in advance for helping out!<br />Regards,<br />Alex]]></description>
<dc:creator>alexandruv</dc:creator>
<category>Migration from Other Servers</category><pubDate>Fri, 24 May 2013 02:44:10 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?5,239492,239492#msg-239492</guid>
<title>Hi from Warsaw (no replies)</title><link>http://forum.nginx.org/read.php?5,239492,239492#msg-239492</link><description><![CDATA[Hello everyone,<br />Not sure how this works but .. here's a short intro about me: i'm not a server admin but I like to setup/config stuff on my debian vps. Hope to learn more every day :)<br /><br />Thank you,<br />Alex]]></description>
<dc:creator>alexandruv</dc:creator>
<category>New Member Introductions</category><pubDate>Thu, 23 May 2013 18:42:16 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?11,239491,239491#msg-239491</guid>
<title>Nginx conf not working all of a sudden. What is the proper way to write this? (1 reply)</title><link>http://forum.nginx.org/read.php?11,239491,239491#msg-239491</link><description><![CDATA[First of all, let me state that I am brand new to nginx and I have not yet gotten to that point where I am able to diagnose issues on my own. So I am hoping one of you guys will be able to help me out!<br /><br />I had a VPS running with nginx and the following file, but then I HAD to delete the installed operating system and reinstall Arch Linux. It was working with THIS EXACT configuration file (nginx.conf) and now after I reinstalled the VPS and reuploaded the same exact conf file (I made a backup of it before reinstalling) it refuses to work. When I &quot;`sudo systemctl restart nginx`&quot;, it gives me the following error: `&quot;Job for nginx.service failed. See 'systemctl status nginx.service' and 'journalctl -xn' for details.&quot;`<br /><br />This is the conf file I am referring to:<br /><br />#user html;<br />worker_processes 4;<br /><br />#error_log logs/error.log;<br />#error_log logs/error.log notice;<br />#error_log logs/error.log info;<br /><br />#pid logs/nginx.pid;<br /><br /><br />events {<br />worker_connections 1024;<br />}<br /><br /><br />http {<br />include mime.types;<br />default_type application/octet-stream;<br /><br />#log_format main '$remote_addr - $remote_user [$time_local] &quot;$request&quot; '<br /># '$status $body_bytes_sent &quot;$http_referer&quot; '<br /># '&quot;$http_user_agent&quot; &quot;$http_x_forwarded_for&quot;';<br /><br />#access_log logs/access.log main;<br /><br />sendfile on;<br />#tcp_nopush on;<br /><br />#keepalive_timeout 0;<br />keepalive_timeout 65;<br /><br />gzip on;<br /><br />server {<br />listen 80;<br />server_name localhost;<br /><br />#charset koi8-r;<br /><br />#access_log logs/host.access.log main;<br /><br />location / {<br />root /usr/share/nginx/html;<br />index index.html index.htm index.php;<br />}<br /><br />#error_page 404 /404.html;<br /><br /><br />error_page 500 502 503 504 /50x.html;<br />location = /50x.html {<br />root /usr/share/nginx/html;<br />}<br /><br />location ~ \.php$ {<br />fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;<br />fastcgi_index index.php;<br />root /usr/share/nginx/html;<br />include fastcgi.conf;<br />}<br /><br />location ~ /\.ht {<br />deny all;<br />}<br />}<br /><br /><br />server {<br />listen 80;<br />server_name www.brackishmedia.com brackishmedia.com;<br /><br />#charset koi8-r;<br /><br />#access_log logs/host.access.log main;<br /><br />location / {<br />root /usr/share/nginx/brackishmedia.com/html;<br />index index.html index.htm index.php;<br />}<br /><br />#error_page 404 /404.html;<br /><br /><br />error_page 500 502 503 504 /50x.html;<br />location = /50x.html {<br />root /usr/share/nginx/html;<br />}<br /><br />location ~ \.php$ {<br />fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;<br />fastcgi_index index.php;<br />root /usr/share/nginx/brackishmedia.com/html;<br />include fastcgi.conf;<br />}<br /><br />location ~ /\.ht {<br />deny all;<br />}<br />}<br /><br />include /usr/share/nginx/rescuechurchmiami.com/conf/*;<br /><br />}<br /><br /><br />If I remove the following part:<br /><br />server {<br />listen 80;<br />server_name www.brackishmedia.com brackishmedia.com;<br /><br />#charset koi8-r;<br /><br />#access_log logs/host.access.log main;<br /><br />location / {<br />root /usr/share/nginx/brackishmedia.com/html;<br />index index.html index.htm index.php;<br />}<br /><br />#error_page 404 /404.html;<br /><br /><br />error_page 500 502 503 504 /50x.html;<br />location = /50x.html {<br />root /usr/share/nginx/html;<br />}<br /><br />location ~ \.php$ {<br />fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;<br />fastcgi_index index.php;<br />root /usr/share/nginx/brackishmedia.com/html;<br />include fastcgi.conf;<br />}<br /><br />location ~ /\.ht {<br />deny all;<br />}<br />}<br /><br />include /usr/share/nginx/rescuechurchmiami.com/conf/*;<br /><br />and do a `sudo systemctl restart nginx`, it works perfectly. However, I need those that other server block in there and that `include /usr/share/nginx/rescuechurchmiami.com/conf/*;` goes to a configuration file that is specifically for a WordPress install.<br /><br />So these are the issues I am having. Any suggestions on fixing it? I don't even understand why it won't just work like it did on the former VPS anyway.<br /><br />Thank you,<br />AJ]]></description>
<dc:creator>ajcr</dc:creator>
<category>How to...</category><pubDate>Fri, 24 May 2013 04:09:47 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?11,239489,239489#msg-239489</guid>
<title>nginx conf access rule blocking certain url's (1 reply)</title><link>http://forum.nginx.org/read.php?11,239489,239489#msg-239489</link><description><![CDATA[We have url's like this: /demand/change_db_value/18050/13/.80/0/cost<br /><br />Notice the /.80<br /><br />In our nginx conf for our site we have this access rule: location ~ /\.ht { deny all; log_not_found off; access_log off; }<br /><br />This rule produces this error in the logs: error.log: access forbidden by rule, server: oursite.tld, request: &quot;GET /demand/change_db_value/18050/13/.80/0/cost HTTP/1.1&quot;<br /><br />We want to of course block access to any .htaccess files or files beginning with &quot;.&quot;, but how do we make an exception for this particular url structure?]]></description>
<dc:creator>usazelf</dc:creator>
<category>How to...</category><pubDate>Fri, 24 May 2013 04:07:38 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?5,239488,239488#msg-239488</guid>
<title>Hello, new user here (no replies)</title><link>http://forum.nginx.org/read.php?5,239488,239488#msg-239488</link><description><![CDATA[Hello,<br /><br />I have some issues with my nginx. It's related to forbidding hotlinking of my images to other websites. Since I host a lot of images I get a lot of my bandwidth leached . I will ask question i proper section. If there is some kind of IRC chat that would be great.]]></description>
<dc:creator>nginx_user99</dc:creator>
<category>New Member Introductions</category><pubDate>Thu, 23 May 2013 16:44:13 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?2,239486,239486#msg-239486</guid>
<title>Rewriting (2 replies)</title><link>http://forum.nginx.org/read.php?2,239486,239486#msg-239486</link><description><![CDATA[Hi,<br />I use opencart with nginx+php-fpm. Sometimes it is necessary to redirect all clients, except admin (190.212.201.0/24), to &quot;Service unavailable&quot; page which is simple index.html file with logo, background image and some text, located in /unav directory.<br />Below some of nginx.conf<br /><br /><br />location / {<br /><br />if ($remote_addr !~ '190\.212\.201\.[0-9]{0,3}') {<br />rewrite ^/(.*)$ /unav/$1 break;<br />return 403;<br />}<br />try_files $uri $uri/ @opencart;<br />}<br /><br />location ^~ /unav {<br />}<br /><br />location @opencart {<br />rewrite ^/(.+)$ /index.php?_route_=$1 last;<br />}<br /><br />[...skipped...]<br /><br />location ~ \.php$ {<br /><br />try_files $uri =404;<br />fastcgi_read_timeout 60s;<br />fastcgi_send_timeout 60s;<br />include myphp-fpm.conf;<br /><br />}<br /><br />Problem is in rewriting.<br />This rule<br /><br />rewrite ^/(.*)$ /unav/$1 break;<br /><br />rewrite ONLY http://mysite.com/ request but in case http://mysite.com/index.php rewrite is none and request processed by location ~ \.php$ rule. Why??<br /><br />Thanks!<br /><br /><br />_______________________________________________<br />nginx mailing list<br />nginx@nginx.org<br />http://mailman.nginx.org/mailman/listinfo/nginx]]></description>
<dc:creator>artem</dc:creator>
<category>Nginx Mailing List - English</category><pubDate>Fri, 24 May 2013 13:00:02 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?2,239483,239483#msg-239483</guid>
<title>NGINX error log format documentation (1 reply)</title><link>http://forum.nginx.org/read.php?2,239483,239483#msg-239483</link><description><![CDATA[Hey!<br /><br />I want to parse NGINX error logs. However, I did not find any<br />documentation concerning the used log format. While the meaning of some<br />fields like the data is pretty obvious, for some it is not at all. In<br />addition, I cannot be sure that my parser is complete if I do not have a<br />documentation of all the possible fields. Since it seems you can change<br />the access log format, but not that of the error log, I really have no<br />idea how to get the information I need.<br /><br />Is there such documentation?<br /><br />I also posted this question on StackOverflow:<br />http://stackoverflow.com/questions/16711573/nginx-error-log-format-documentation/16711684<br /><br />Thank you!<br /><br /><br />_______________________________________________<br />nginx mailing list<br />nginx@nginx.org<br />http://mailman.nginx.org/mailman/listinfo/nginx]]></description>
<dc:creator>Jan Teske</dc:creator>
<category>Nginx Mailing List - English</category><pubDate>Thu, 23 May 2013 15:32:01 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?21,239481,239481#msg-239481</guid>
<title>Re[2]: Обработка ответов от бэкэнда (1 reply)</title><link>http://forum.nginx.org/read.php?21,239481,239481#msg-239481</link><description><![CDATA[Здравствуйте, F1restorm.<br /><br />&gt; Как сохранить или передать другому серверу ответ (заголовок и тело) от<br />&gt; бэкэнда при определенных условиях (например, код ошибки 500+)?<br />&gt; Вариант с отладочными логами не подойдет, т.к. при решении задачи потери<br />&gt; производительности должны быть минимальными.<br /><br />Объедините бэкенды в апстрим и тогда если один бэкенд упадёт или<br />вернёт ошибку, то запрос будет повторно отправлен на следующий бэкенд.<br /><br />--<br />С уважением,<br />Михаил mailto:postmaster@softsearch.ru<br /><br />_______________________________________________<br />nginx-ru mailing list<br />nginx-ru@nginx.org<br />http://mailman.nginx.org/mailman/listinfo/nginx-ru]]></description>
<dc:creator>Михаил Монашёв</dc:creator>
<category>Nginx Mailing List - Russian</category><pubDate>Thu, 23 May 2013 16:32:01 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?29,239480,239480#msg-239480</guid>
<title>[nginx] Core: strengthen configuration syntax checker. (no replies)</title><link>http://forum.nginx.org/read.php?29,239480,239480#msg-239480</link><description><![CDATA[details: http://hg.nginx.org/nginx/rev/ea41bba49e8a<br />branches:<br />changeset: 5227:ea41bba49e8a<br />user: Valentin Bartenev &lt;vbart@nginx.com&gt;<br />date: Thu May 23 20:30:27 2013 +0400<br />description:<br />Core: strengthen configuration syntax checker.<br /><br />It is now a syntax error if tokens passed to a custom configuration<br />handler are terminated by &quot;{&quot;.<br /><br />The following incorrect configuration is now properly rejected:<br /><br />map $v $v2 {<br />a b {<br />c d {<br />e f {<br />}<br /><br />diffstat:<br /><br />src/core/ngx_conf_file.c | 5 +++++<br />1 files changed, 5 insertions(+), 0 deletions(-)<br /><br />diffs (15 lines):<br /><br />diff -r a30ea5c6451d -r ea41bba49e8a src/core/ngx_conf_file.c<br />--- a/src/core/ngx_conf_file.c Thu May 23 16:26:10 2013 +0400<br />+++ b/src/core/ngx_conf_file.c Thu May 23 20:30:27 2013 +0400<br />@@ -225,6 +225,11 @@ ngx_conf_parse(ngx_conf_t *cf, ngx_str_t<br />* &quot;types { ... }&quot; directive<br />*/<br /><br />+ if (rc == NGX_CONF_BLOCK_START) {<br />+ ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, &quot;unexpected \&quot;{\&quot;&quot;);<br />+ goto failed;<br />+ }<br />+<br />rv = (*cf-&gt;handler)(cf, NULL, cf-&gt;handler_conf);<br />if (rv == NGX_CONF_OK) {<br />continue;<br /><br />_______________________________________________<br />nginx-devel mailing list<br />nginx-devel@nginx.org<br />http://mailman.nginx.org/mailman/listinfo/nginx-devel]]></description>
<dc:creator>Valentin Bartenev</dc:creator>
<category>Nginx Development</category><pubDate>Thu, 23 May 2013 12:34:01 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?2,239475,239475#msg-239475</guid>
<title>How to tell nginx to check dead backend in upstream adaptively? (no replies)</title><link>http://forum.nginx.org/read.php?2,239475,239475#msg-239475</link><description><![CDATA[Hi,<br /><br />Currently nginx will check every fail_timeout (default=10s) which is too<br />frequent when the backend server dead completely that require manually<br />replacement and it might take long time.<br /><br />Definitely we can mark it as down in the config, but that is not an<br />automatic solution.<br /><br />Is it possible to config nginx that it check adaptively?<br />e.g. start from 10s, then 20s, 40s, 60s etc?<br /><br />Or are there any better approach?<br /><br />Thanks.<br />_______________________________________________<br />nginx mailing list<br />nginx@nginx.org<br />http://mailman.nginx.org/mailman/listinfo/nginx]]></description>
<dc:creator>Ryan Chan</dc:creator>
<category>Nginx Mailing List - English</category><pubDate>Thu, 23 May 2013 11:18:01 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?2,239473,239473#msg-239473</guid>
<title>Override Content-Type header with proxied requests (4 replies)</title><link>http://forum.nginx.org/read.php?2,239473,239473#msg-239473</link><description><![CDATA[Hi !!<br /><br />i have a Nginx server that operates as a reverse proxy to a my bucket in Amazon S3.<br /><br />Amazon S3 service could deliver contents with wrong Content-Type header,<br />so i would like to override this header by referring to file extension.<br /><br />In other servers i have just configured the &quot;types&quot; block with all mime types mapped with file estensions,<br />but this approach only works when Nginx delivers contents directly (as a origin server).<br />If the server is a reverse proxy, doesn't add a new Content-Type header, but honors Content-Type (if exists) received by the origin.<br /><br />Is it possible to override the content-type response header using &quot;types&quot; block? Is there any best practice to override content-type header by file extensions? Is &quot;map&quot; suggested for this purpose or using multiple &quot;location&quot; block is better?<br /><br />Thanks in advance!!<br />---<br />Andrea]]></description>
<dc:creator>andrea.mandolo</dc:creator>
<category>Nginx Mailing List - English</category><pubDate>Fri, 24 May 2013 04:58:49 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?29,239472,239472#msg-239472</guid>
<title>[nginx] Memcached: stricten header validation. (no replies)</title><link>http://forum.nginx.org/read.php?29,239472,239472#msg-239472</link><description><![CDATA[details: http://hg.nginx.org/nginx/rev/a30ea5c6451d<br />branches:<br />changeset: 5226:a30ea5c6451d<br />user: Ruslan Ermilov &lt;ru@nginx.com&gt;<br />date: Thu May 23 16:26:10 2013 +0400<br />description:<br />Memcached: stricten header validation.<br /><br />An invalid memcached reply that started with '\n' could cause<br />segmentation fault.<br /><br />An invalid memcached reply &quot;VALUE / 0 2\r?ok\r\nEND\r\n&quot; was<br />considered as a valid response.<br /><br />In addition, if memcached reports that the key was not found,<br />set u-&gt;headers_in.content_length_n to 0. This ensures that<br />ngx_http_memcached_filter() will not be called while previous<br />code relied on always intercepting 404. Initialization of<br />ctx-&gt;rest was moved to where it belongs.<br /><br />diffstat:<br /><br />src/http/modules/ngx_http_memcached_module.c | 26 +++++++++++++++++---------<br />1 files changed, 17 insertions(+), 9 deletions(-)<br /><br />diffs (75 lines):<br /><br />diff -r 15a7deeaa19a -r a30ea5c6451d src/http/modules/ngx_http_memcached_module.c<br />--- a/src/http/modules/ngx_http_memcached_module.c Thu May 23 15:47:58 2013 +0400<br />+++ b/src/http/modules/ngx_http_memcached_module.c Thu May 23 16:26:10 2013 +0400<br />@@ -197,7 +197,6 @@ ngx_http_memcached_handler(ngx_http_requ<br />return NGX_HTTP_INTERNAL_SERVER_ERROR;<br />}<br /><br />- ctx-&gt;rest = NGX_HTTP_MEMCACHED_END;<br />ctx-&gt;request = r;<br /><br />ngx_http_set_ctx(r, ctx, ngx_http_memcached_module);<br />@@ -309,10 +308,15 @@ ngx_http_memcached_process_header(ngx_ht<br /><br />found:<br /><br />+ line.data = u-&gt;buffer.pos;<br />+ line.len = p - u-&gt;buffer.pos;<br />+<br />+ if (line.len == 0 || *(p - 1) != CR) {<br />+ goto no_valid;<br />+ }<br />+<br />*p = '\0';<br />-<br />- line.len = p - u-&gt;buffer.pos - 1;<br />- line.data = u-&gt;buffer.pos;<br />+ line.len--;<br /><br />ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r-&gt;connection-&gt;log, 0,<br />&quot;memcached: \&quot;%V\&quot;&quot;, &amp;line);<br />@@ -387,10 +391,9 @@ found:<br />length:<br /><br />start = p;<br />+ p = line.data + line.len;<br /><br />- while (*p &amp;&amp; *p++ != CR) { /* void */ }<br />-<br />- u-&gt;headers_in.content_length_n = ngx_atoof(start, p - start - 1);<br />+ u-&gt;headers_in.content_length_n = ngx_atoof(start, p - start);<br />if (u-&gt;headers_in.content_length_n == -1) {<br />ngx_log_error(NGX_LOG_ERR, r-&gt;connection-&gt;log, 0,<br />&quot;memcached sent invalid length in response \&quot;%V\&quot; &quot;<br />@@ -401,7 +404,7 @@ found:<br /><br />u-&gt;headers_in.status_n = 200;<br />u-&gt;state-&gt;status = 200;<br />- u-&gt;buffer.pos = p + 1;<br />+ u-&gt;buffer.pos = p + sizeof(CRLF) - 1;<br /><br />return NGX_OK;<br />}<br />@@ -410,8 +413,10 @@ found:<br />ngx_log_error(NGX_LOG_INFO, r-&gt;connection-&gt;log, 0,<br />&quot;key: \&quot;%V\&quot; was not found by memcached&quot;, &amp;ctx-&gt;key);<br /><br />+ u-&gt;headers_in.content_length_n = 0;<br />u-&gt;headers_in.status_n = 404;<br />u-&gt;state-&gt;status = 404;<br />+ u-&gt;buffer.pos = p + sizeof(&quot;END&quot; CRLF) - 1;<br />u-&gt;keepalive = 1;<br /><br />return NGX_OK;<br />@@ -435,7 +440,10 @@ ngx_http_memcached_filter_init(void *dat<br /><br />u = ctx-&gt;request-&gt;upstream;<br /><br />- u-&gt;length += NGX_HTTP_MEMCACHED_END;<br />+ if (u-&gt;headers_in.status_n != 404) {<br />+ u-&gt;length += NGX_HTTP_MEMCACHED_END;<br />+ ctx-&gt;rest = NGX_HTTP_MEMCACHED_END;<br />+ }<br /><br />return NGX_OK;<br />}<br /><br />_______________________________________________<br />nginx-devel mailing list<br />nginx-devel@nginx.org<br />http://mailman.nginx.org/mailman/listinfo/nginx-devel]]></description>
<dc:creator>Ruslan Ermilov</dc:creator>
<category>Nginx Development</category><pubDate>Thu, 23 May 2013 09:20:00 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?29,239470,239470#msg-239470</guid>
<title>[nginx] Use &quot;void&quot; for functions with empty parameter list. (no replies)</title><link>http://forum.nginx.org/read.php?29,239470,239470#msg-239470</link><description><![CDATA[details: http://hg.nginx.org/nginx/rev/15a7deeaa19a<br />branches:<br />changeset: 5225:15a7deeaa19a<br />user: Sergey Kandaurov &lt;pluknet@nginx.com&gt;<br />date: Thu May 23 15:47:58 2013 +0400<br />description:<br />Use &quot;void&quot; for functions with empty parameter list.<br /><br />diffstat:<br /><br />src/http/ngx_http_spdy.c | 2 +-<br />src/http/ngx_http_spdy.h | 2 +-<br />src/os/unix/ngx_darwin_init.c | 2 +-<br />src/os/unix/ngx_freebsd_init.c | 2 +-<br />src/os/unix/ngx_freebsd_rfork_thread.c | 2 +-<br />src/os/unix/ngx_freebsd_rfork_thread.h | 4 ++--<br />6 files changed, 7 insertions(+), 7 deletions(-)<br /><br />diffs (81 lines):<br /><br />diff -r 09d7faaef16f -r 15a7deeaa19a src/http/ngx_http_spdy.c<br />--- a/src/http/ngx_http_spdy.c Thu May 23 10:23:21 2013 +0400<br />+++ b/src/http/ngx_http_spdy.c Thu May 23 15:47:58 2013 +0400<br />@@ -2176,7 +2176,7 @@ ngx_http_spdy_handle_request_header(ngx_<br /><br /><br />void<br />-ngx_http_spdy_request_headers_init()<br />+ngx_http_spdy_request_headers_init(void)<br />{<br />ngx_uint_t i;<br />ngx_http_spdy_request_header_t *h;<br />diff -r 09d7faaef16f -r 15a7deeaa19a src/http/ngx_http_spdy.h<br />--- a/src/http/ngx_http_spdy.h Thu May 23 10:23:21 2013 +0400<br />+++ b/src/http/ngx_http_spdy.h Thu May 23 15:47:58 2013 +0400<br />@@ -186,7 +186,7 @@ ngx_http_spdy_queue_blocked_frame(ngx_ht<br /><br /><br />void ngx_http_spdy_init(ngx_event_t *rev);<br />-void ngx_http_spdy_request_headers_init();<br />+void ngx_http_spdy_request_headers_init(void);<br /><br />ngx_int_t ngx_http_spdy_read_request_body(ngx_http_request_t *r,<br />ngx_http_client_body_handler_pt post_handler);<br />diff -r 09d7faaef16f -r 15a7deeaa19a src/os/unix/ngx_darwin_init.c<br />--- a/src/os/unix/ngx_darwin_init.c Thu May 23 10:23:21 2013 +0400<br />+++ b/src/os/unix/ngx_darwin_init.c Thu May 23 15:47:58 2013 +0400<br />@@ -59,7 +59,7 @@ sysctl_t sysctls[] = {<br /><br /><br />void<br />-ngx_debug_init()<br />+ngx_debug_init(void)<br />{<br />#if (NGX_DEBUG_MALLOC)<br /><br />diff -r 09d7faaef16f -r 15a7deeaa19a src/os/unix/ngx_freebsd_init.c<br />--- a/src/os/unix/ngx_freebsd_init.c Thu May 23 10:23:21 2013 +0400<br />+++ b/src/os/unix/ngx_freebsd_init.c Thu May 23 15:47:58 2013 +0400<br />@@ -72,7 +72,7 @@ sysctl_t sysctls[] = {<br /><br /><br />void<br />-ngx_debug_init()<br />+ngx_debug_init(void)<br />{<br />#if (NGX_DEBUG_MALLOC)<br /><br />diff -r 09d7faaef16f -r 15a7deeaa19a src/os/unix/ngx_freebsd_rfork_thread.c<br />--- a/src/os/unix/ngx_freebsd_rfork_thread.c Thu May 23 10:23:21 2013 +0400<br />+++ b/src/os/unix/ngx_freebsd_rfork_thread.c Thu May 23 15:47:58 2013 +0400<br />@@ -271,7 +271,7 @@ ngx_init_threads(int n, size_t size, ngx<br /><br /><br />ngx_tid_t<br />-ngx_thread_self()<br />+ngx_thread_self(void)<br />{<br />ngx_int_t tid;<br /><br />diff -r 09d7faaef16f -r 15a7deeaa19a src/os/unix/ngx_freebsd_rfork_thread.h<br />--- a/src/os/unix/ngx_freebsd_rfork_thread.h Thu May 23 10:23:21 2013 +0400<br />+++ b/src/os/unix/ngx_freebsd_rfork_thread.h Thu May 23 15:47:58 2013 +0400<br />@@ -57,7 +57,7 @@ extern size_t ngx_thread_stack_size;<br /><br /><br />static ngx_inline ngx_int_t<br />-ngx_gettid()<br />+ngx_gettid(void)<br />{<br />char *sp;<br /><br />@@ -83,7 +83,7 @@ ngx_gettid()<br />}<br /><br /><br />-ngx_tid_t ngx_thread_self();<br />+ngx_tid_t ngx_thread_self(void);<br /><br /><br />typedef ngx_uint_t ngx_tls_key_t;<br /><br />_______________________________________________<br />nginx-devel mailing list<br />nginx-devel@nginx.org<br />http://mailman.nginx.org/mailman/listinfo/nginx-devel]]></description>
<dc:creator>Sergey Kandaurov</dc:creator>
<category>Nginx Development</category><pubDate>Thu, 23 May 2013 07:50:01 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?29,239465,239465#msg-239465</guid>
<title>[nginx] Configure: fixed test of OS X atomic(3). (no replies)</title><link>http://forum.nginx.org/read.php?29,239465,239465#msg-239465</link><description><![CDATA[details: http://hg.nginx.org/nginx/rev/09d7faaef16f<br />branches:<br />changeset: 5224:09d7faaef16f<br />user: Ruslan Ermilov &lt;ru@nginx.com&gt;<br />date: Thu May 23 10:23:21 2013 +0400<br />description:<br />Configure: fixed test of OS X atomic(3).<br /><br />diffstat:<br /><br />auto/os/darwin | 2 +-<br />1 files changed, 1 insertions(+), 1 deletions(-)<br /><br />diffs (10 lines):<br /><br />diff -r 71d85de7b53b -r 09d7faaef16f auto/os/darwin<br />--- a/auto/os/darwin Tue May 21 18:45:07 2013 -0700<br />+++ b/auto/os/darwin Thu May 23 10:23:21 2013 +0400<br />@@ -112,5 +112,5 @@ ngx_feature_incs=&quot;#include &lt;libkern/OSAt<br />ngx_feature_path=<br />ngx_feature_libs=<br />ngx_feature_test=&quot;int32_t lock, n;<br />- n = OSAtomicCompareAndSwap32Barrier(0, 1, lock)&quot;<br />+ n = OSAtomicCompareAndSwap32Barrier(0, 1, &amp;lock)&quot;<br />. auto/feature<br /><br />_______________________________________________<br />nginx-devel mailing list<br />nginx-devel@nginx.org<br />http://mailman.nginx.org/mailman/listinfo/nginx-devel]]></description>
<dc:creator>Ruslan Ermilov</dc:creator>
<category>Nginx Development</category><pubDate>Thu, 23 May 2013 04:12:00 -0400</pubDate></item>
<item>
<guid>http://forum.nginx.org/read.php?3,239463,239463#msg-239463</guid>
<title>Apache + FPM load balancer CFG problems. (8 replies)</title><link>http://forum.nginx.org/read.php?3,239463,239463#msg-239463</link><description><![CDATA[I'm having some problems with apache virtualhosts (vhosts scripts are set<br />in &quot;/home/vhosts/$VHOST&quot;)...<br /><br />&lt;VirtualHost *:80&gt;<br />ServerName www.site.com<br />ProxyPass / fcgi://192.168.56.202:9001/home/vhosts/www.site.com/<br />ProxyPassReverse / fcgi://192.168.56.202:9001/home/vhosts/www.site.com/<br />ErrorLog &quot;logs/www.site.com-error_log&quot;<br />CustomLog &quot;logs/www.site.com-access_log&quot; common<br />&lt;/VirtualHost&gt;<br /><br />This configuration works, when apache receives a request for domain<br />&quot;www.site.com&quot; it will forward it to 192.168.56.202 backendserver and this<br />server finds the proper script at &quot;/home/vhosts/www.site.com&quot;.<br /><br />My problems are concerning load balancing. My configuration is:<br /><br />&lt;VirtualHost *:80&gt;<br />ServerName www.site.com<br />&lt;Proxy balancer://site&gt;<br />BalancerMember fcgi://192.168.56.204:9001<br />BalancerMember fcgi://192.168.56.203:9001<br />&lt;/Proxy&gt;<br />ProxyPass / balancer://site/<br />ErrorLog &quot;logs/www.site.com-error_log&quot;<br />CustomLog &quot;logs/www.site.com-access_log&quot; common<br />&lt;/VirtualHost&gt;<br /><br />But it is not working: requests will be forwarded to those backends, but I<br />can't figure out how to make those BalancerMember backends to point at<br />&quot;/home/vhosts/www.site.com&quot;.<br />How should I do that?<br /><br />--<br /><br />---<br />You received this message because you are subscribed to the Google Groups &quot;highload-php-en&quot; group.<br />To unsubscribe from this group and stop receiving emails from it, send an email to highload-php-en+unsubscribe@googlegroups.com.<br />For more options, visit https://groups.google.com/groups/opt_out.]]></description>
<dc:creator>Renzo Racioppi</dc:creator>
<category>Php-fpm Mailing List - English</category><pubDate>Fri, 24 May 2013 09:56:06 -0400</pubDate></item>
</channel>
</rss>