<div dir="ltr">Включил дебаг (с пересборкой nginx). Конфиг приобрел следующий вид<div><div>server {</div><div>listen *:80;</div><div>server_name <a href="http://img.mgshare.com">img.mgshare.com</a>  <a href="http://img-a6.site1.com">img-a6.site1.com</a> ;</div><div>root /home/site1/<a href="http://site1.com">site1.com</a>;</div><div><br></div><div>    location ~* \.(jpg|jpeg|gif|png|ico|css|bmp|swf|js|html|txt)$ {</div><div><span class="" style="white-space:pre">  </span>root /home/site1/<a href="http://site1.com/">site1.com/</a>;</div><div>        try_files $uri $uri/ @fallback;</div><div>        error_log  /home/site1/logs/site1.com-img-error.log debug ;</div><div>    }</div><div>    </div><div>    location @fallback</div><div>    {</div><div><span class="" style="white-space:pre">       </span>proxy_pass <a href="http://db.site1.com">http://db.site1.com</a>;</div><div><span class="" style="white-space:pre">    </span>proxy_store /home/site1/<a href="http://site1.com/$request_uri">site1.com/$request_uri</a>;</div><div>#<span class="" style="white-space:pre"> </span>proxy_store /home/site1/<a href="http://site1.com/111">site1.com/111</a>;</div><div><span class="" style="white-space:pre">    </span>proxy_cache_key  $host$uri$query_string;</div><div><span class="" style="white-space:pre">  </span>root /home/site1/<a href="http://site1.com">site1.com</a>;</div><div><span class="" style="white-space:pre">   </span>proxy_store_access  user:rw  group:rw  all:rw;</div><div>        error_log  /home/site1/logs/fallback-error.log debug;</div><div>        access_log  /home/site1/logs/fallback-access.log ;</div><div>    }</div><div><br></div><div>}</div></div><div>А дальше замечено странное: при обращении к jpg файлам запись НЕ производится, но к урлу добавить что нить, например <a href="http://site1.com/1.jpg?aaaa">site1.com/1.jpg?aaaa</a> - то файл записывается нормально.</div><div>Вот логи на 1.jpg:</div><div>Куда смотреть дальше?</div><div><br></div><div>site1.com-img-error.log:<br></div><div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http cl:-1 max:1048576</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 rewrite phase: 2</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 post rewrite phase: 3</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 generic phase: 4</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 generic phase: 5</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 access phase: 6</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 access phase: 7</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 post access phase: 8</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 try files phase: 9</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http script var: "/1.jpg"</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 trying to use file: "/1.jpg" "/home/site1/<a href="http://site1.com/1.jpg">site1.com/1.jpg</a>"</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http script var: "/1.jpg"</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 trying to use dir: "/1.jpg" "/home/site1/<a href="http://site1.com/1.jpg">site1.com/1.jpg</a>"</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 trying to use file: "@fallback" "/home/site1/site1.com@fallback"</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 test location: "@fallback"</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 using location: @fallback "/1.jpg?"</div></div><div><br></div><div>fallback-error.log:<br></div><div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 rewrite phase: 2</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 post rewrite phase: 3</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 generic phase: 4</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 generic phase: 5</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 access phase: 6</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 access phase: 7</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 post access phase: 8</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 try files phase: 9</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http init upstream, client timer: 0</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 kevent set event: 324: ft:-2 fl:0025</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http script copy: "Host: "</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http script var: "<a href="http://db.site1.com">db.site1.com</a>"</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http script copy: "</div><div>"</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http script copy: "Connection: close</div><div>"</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http script copy: ""</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http script copy: ""</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http proxy header: "Cache-Control: max-age=0"</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http proxy header: "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8"</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http proxy header: "User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.111 Safari/537.36"</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http proxy header: "Accept-Encoding: gzip,deflate,sdch"</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http proxy header: "Accept-Language: ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4"</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http proxy header: "Cookie: _ym_visorc_22428427=w; _ga=GA1.2.863053105.1404152211; _gat=1; _ym_visorc_17454814=b"</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http proxy header: "If-None-Match: "545f6fac-8cb2""</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http proxy header: "If-Modified-Since: Sun, 09 Nov 2014 13:44:12 GMT"</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http proxy header:</div><div>"GET /1.jpg HTTP/1.0</div><div>Host: <a href="http://db.site1.com">db.site1.com</a></div><div>Connection: close</div><div>Cache-Control: max-age=0</div><div>Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8</div><div>User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.111 Safari/537.36</div><div>Accept-Encoding: gzip,deflate,sdch</div><div>Accept-Language: ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4</div><div>Cookie: _ym_visorc_22428427=w; _ga=GA1.2.863053105.1404152211; _gat=1; _ym_visorc_17454814=b</div><div>If-None-Match: "545f6fac-8cb2"</div><div>If-Modified-Since: Sun, 09 Nov 2014 13:44:12 GMT</div><div><br></div><div>"</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http cleanup add: 0000000802470FC0</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 get rr peer, try: 1</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 socket 49</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 connect to <a href="http://91.109.201.5:80">91.109.201.5:80</a>, fd:49 #1404</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 kevent set event: 49: ft:-1 fl:0025</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 kevent set event: 49: ft:-2 fl:0025</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http upstream connect: -2</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 posix_memalign: 0000000802422800:128 @16</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 event timer add: 49: 60000:1415648719950</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http finalize request: -4, "/1.jpg?" a:1, c:3</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http request count:3 blk:0</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http finalize request: -4, "/1.jpg?" a:1, c:2</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http request count:2 blk:0</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 post event 000000080257D0A0</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 delete posted event 000000080257D0A0</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http run request: "/1.jpg?"</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http request empty handler</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 post event 000000080257E3E0</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 delete posted event 000000080257E3E0</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http upstream request: "/1.jpg?"</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http upstream send request handler</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http upstream send request</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 chain writer buf fl:1 s:563</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 chain writer in: 000000080248A9D0</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 writev: 563 of 563</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 chain writer out: 0000000000000000</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 event timer del: 49: 1415648719950</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 event timer add: 49: 60000:1415648719953</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 post event 000000080257E3E0</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 post event 00000008025623E0</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 delete posted event 00000008025623E0</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http upstream request: "/1.jpg?"</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http upstream process header</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 malloc: 0000000802494000:4096</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 recv: eof:0, avail:175, err:0</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 recv: fd:49 175 of 4096</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http proxy status 304 "304 Not Modified"</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http proxy header: "Server: nginx/1.6.2"</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http proxy header: "Date: Mon, 10 Nov 2014 23:42:59 GMT"</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http proxy header: "Last-Modified: Sun, 09 Nov 2014 13:44:12 GMT"</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http proxy header: "Connection: close"</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http proxy header: "ETag: "545f6fac-8cb2""</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http proxy header done</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 HTTP/1.1 304 Not Modified</div><div>Server: nginx/1.6.2</div><div>Date: Mon, 10 Nov 2014 19:44:19 GMT</div><div>Connection: keep-alive</div><div>Last-Modified: Sun, 09 Nov 2014 13:44:12 GMT</div><div>ETag: "545f6fac-8cb2"</div><div><br></div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 write new buf t:1 f:0 000000080248AC80, pos 000000080248AC80, size: 180 file: 0, size: 0</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http write filter: l:0 f:0 s:180</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http cacheable: 0</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http proxy filter init s:304 h:0 c:0 l:-1</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http upstream process upstream</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 pipe read upstream: 0</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 pipe preread: 0</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 pipe buf free s:0 t:1 f:0 0000000802494000, pos 00000008024940AF, size: 0 file: 0, size: 0</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 pipe length: 0</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 pipe write downstream: 1</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 pipe write downstream done</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 event timer: 49, old: 1415648719953, new: 1415648719954</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http upstream exit: 0000000000000000</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 finalize http upstream request: 0</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 finalize http proxy request</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 free rr peer 1 0</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 close http upstream connection: 49</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 free: 0000000802422800, unused: 48</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 event timer del: 49: 1415648719953</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 delete posted event 000000080257E3E0</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 reusable connection: 0</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http upstream temp fd: -1</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http output filter "/1.jpg?"</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http copy filter: "/1.jpg?"</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http postpone filter "/1.jpg?" 00007FFFFFFFE780</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 write old buf t:1 f:0 000000080248AC80, pos 000000080248AC80, size: 180 file: 0, size: 0</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 write new buf t:0 f:0 0000000000000000, pos 0000000000000000, size: 0 file: 0, size: 0</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http write filter: l:1 f:0 s:180</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http write filter limit 0</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 writev: 180 of 180</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http write filter 0000000000000000</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http copy filter: 0 "/1.jpg?"</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http finalize request: 0, "/1.jpg?" a:1, c:1</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 set http keepalive handler</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http close request</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 http log handler</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 free: 0000000802494000</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 free: 0000000802470000, unused: 8</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 free: 000000080248A000, unused: 44</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 free: 0000000802406800</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 hc free: 0000000000000000 0</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 hc busy: 0000000000000000 0</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 tcp_nodelay</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 reusable connection: 1</div><div>2014/11/10 22:44:19 [debug] 60244#0: *573 event timer add: 324: 65000:1415648724954</div><div>2014/11/10 22:44:20 [debug] 60244#0: *573 http empty handler</div><div>2014/11/10 22:45:24 [debug] 60244#0: *573 event timer del: 324: 1415648724954</div><div>2014/11/10 22:45:24 [debug] 60244#0: *573 http keepalive handler</div><div>2014/11/10 22:45:24 [debug] 60244#0: *573 close http connection: 324</div><div>2014/11/10 22:45:24 [debug] 60244#0: *573 reusable connection: 0</div><div>2014/11/10 22:45:24 [debug] 60244#0: *573 free: 0000000000000000</div><div>2014/11/10 22:45:24 [debug] 60244#0: *573 free: 00000008025AC000, unused: 0</div><div>2014/11/10 22:45:24 [debug] 60244#0: *573 free: 00000008025AC100, unused: 120</div></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">10 ноября 2014 г., 11:15 пользователь Валентин Бартенев <span dir="ltr"><<a href="mailto:vbart@nginx.com" target="_blank">vbart@nginx.com</a>></span> написал:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Monday 10 November 2014 11:12:52 greenh wrote:<br>
> поставил error log в  debug. ВОобще пусто<br>
</span>[..]<br>
<br>
Помимо этого nginx должен быть собран с опцией --with-debug.<br>
Смотрите документацию: <a href="http://nginx.org/r/error_log/ru" target="_blank">http://nginx.org/r/error_log/ru</a><br>
<br>
--<br>
Валентин Бартенев<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
nginx-ru mailing list<br>
<a href="mailto:nginx-ru@nginx.org">nginx-ru@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx-ru" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx-ru</a></div></div></blockquote></div><br></div>