<div dir="ltr">Да, выдуманный конечно же. Я искал проблему и собрал два минимальных примера – рабочий (с proxy_pass) и нерабочий, который Вы видели (у меня там лишний локейшн /o завалялся от предыдущего).</div><br><div class="gmail_quote"><div dir="ltr">ср, 3 окт. 2018 г. в 8:23, Илья Шипицин <<a href="mailto:chipitsine@gmail.com">chipitsine@gmail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>зеркалить на удаленный сервер - понятно зачем.</div><div>а расскажите, зачем вы зеркалите на локальный (по сути на тот же nginx) ?</div><div><br></div><div>это выдуманный пример или так реально сделано ?<br></div></div><br><div class="gmail_quote"><div dir="ltr">ср, 3 окт. 2018 г. в 10:10, Alexander Azarov <<a href="mailto:self@alaz.me" target="_blank">self@alaz.me</a>>:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Здравствуйте!<div><br></div><div>У меня вопрос про mirror. Он у меня срабатывает, только если в локейшне есть proxy_pass. Если там rewrite..redirect или return, то подзапрос не случается, в логе совсем пусто (даже в debug логе). Так и должно быть? Если да, то может быть имеет смысл что-то в лог писать, а то нелогично как-то получается, директива в конфиге есть, а действия никакого нет.</div><div><br></div><div>Версию nginx и конфиг прикладываю ниже.</div><div><br></div><div>С уважением,<br>Александр</div><div><br></div><div>





<p class="m_5488308493326100778m_-1693852541002432559gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:"Courier New";color:rgb(194,194,194);background-color:rgba(0,0,0,0.95)"><span class="m_5488308493326100778m_-1693852541002432559gmail-s1" style="font-variant-ligatures:no-common-ligatures">nginx version: nginx/1.15.4</span></p>
<p class="m_5488308493326100778m_-1693852541002432559gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:"Courier New";color:rgb(194,194,194);background-color:rgba(0,0,0,0.95)"><span class="m_5488308493326100778m_-1693852541002432559gmail-s1" style="font-variant-ligatures:no-common-ligatures">configure arguments: --prefix=/opt/local --with-cc-opt='-I/opt/local/include -Os' --with-ld-opt='-L/opt/local/lib -Wl,-headerpad_max_install_names' --conf-path=/opt/local/etc/nginx/nginx.conf --error-log-path=/opt/local/var/log/nginx/error.log --http-log-path=/opt/local/var/log/nginx/access.log --pid-path=/opt/local/var/run/nginx/nginx.pid --lock-path=/opt/local/var/run/nginx/nginx.lock --http-client-body-temp-path=/opt/local/var/run/nginx/client_body_temp --http-proxy-temp-path=/opt/local/var/run/nginx/proxy_temp --http-fastcgi-temp-path=/opt/local/var/run/nginx/fastcgi_temp --http-uwsgi-temp-path=/opt/local/var/run/nginx/uwsgi_temp --with-debug --with-http_mp4_module --with-stream</span></p></div><div><br></div><div>





<p class="m_5488308493326100778m_-1693852541002432559gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:"Courier New";color:rgb(194,194,194);background-color:rgba(0,0,0,0.95)"><span class="m_5488308493326100778m_-1693852541002432559gmail-s1" style="font-variant-ligatures:no-common-ligatures">http {</span></p>
<p class="m_5488308493326100778m_-1693852541002432559gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:"Courier New";color:rgb(194,194,194);background-color:rgba(0,0,0,0.95)"><span class="m_5488308493326100778m_-1693852541002432559gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_5488308493326100778m_-1693852541002432559gmail-Apple-converted-space">  </span>include <span class="m_5488308493326100778m_-1693852541002432559gmail-Apple-converted-space">      </span>mime.types;</span></p>
<p class="m_5488308493326100778m_-1693852541002432559gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:"Courier New";color:rgb(194,194,194);background-color:rgba(0,0,0,0.95)"><span class="m_5488308493326100778m_-1693852541002432559gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_5488308493326100778m_-1693852541002432559gmail-Apple-converted-space">  </span>default_type<span class="m_5488308493326100778m_-1693852541002432559gmail-Apple-converted-space">  </span>application/octet-stream;</span></p>
<p class="m_5488308493326100778m_-1693852541002432559gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:"Courier New";color:rgb(194,194,194);background-color:rgba(0,0,0,0.95);min-height:16px"><span class="m_5488308493326100778m_-1693852541002432559gmail-s1" style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p class="m_5488308493326100778m_-1693852541002432559gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:"Courier New";color:rgb(194,194,194);background-color:rgba(0,0,0,0.95)"><span class="m_5488308493326100778m_-1693852541002432559gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_5488308493326100778m_-1693852541002432559gmail-Apple-converted-space">  </span>log_format stat '[$time_local] $server_port $status "$request" "$uri"';</span></p>
<p class="m_5488308493326100778m_-1693852541002432559gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:"Courier New";color:rgb(194,194,194);background-color:rgba(0,0,0,0.95)"><span class="m_5488308493326100778m_-1693852541002432559gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_5488308493326100778m_-1693852541002432559gmail-Apple-converted-space">  </span>log_subrequest on;</span></p>
<p class="m_5488308493326100778m_-1693852541002432559gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:"Courier New";color:rgb(194,194,194);background-color:rgba(0,0,0,0.95)"><span class="m_5488308493326100778m_-1693852541002432559gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_5488308493326100778m_-1693852541002432559gmail-Apple-converted-space">  </span>access_log /dev/stdout stat;</span></p>
<p class="m_5488308493326100778m_-1693852541002432559gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:"Courier New";color:rgb(194,194,194);background-color:rgba(0,0,0,0.95);min-height:16px"><span class="m_5488308493326100778m_-1693852541002432559gmail-s1" style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p class="m_5488308493326100778m_-1693852541002432559gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:"Courier New";color:rgb(194,194,194);background-color:rgba(0,0,0,0.95)"><span class="m_5488308493326100778m_-1693852541002432559gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_5488308493326100778m_-1693852541002432559gmail-Apple-converted-space">  </span>server {</span></p>
<p class="m_5488308493326100778m_-1693852541002432559gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:"Courier New";color:rgb(194,194,194);background-color:rgba(0,0,0,0.95)"><span class="m_5488308493326100778m_-1693852541002432559gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_5488308493326100778m_-1693852541002432559gmail-Apple-converted-space">    </span>listen 8000 default_server;</span></p>
<p class="m_5488308493326100778m_-1693852541002432559gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:"Courier New";color:rgb(194,194,194);background-color:rgba(0,0,0,0.95);min-height:16px"><span class="m_5488308493326100778m_-1693852541002432559gmail-s1" style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p class="m_5488308493326100778m_-1693852541002432559gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:"Courier New";color:rgb(194,194,194);background-color:rgba(0,0,0,0.95)"><span class="m_5488308493326100778m_-1693852541002432559gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_5488308493326100778m_-1693852541002432559gmail-Apple-converted-space">    </span>location /r {</span></p>
<p class="m_5488308493326100778m_-1693852541002432559gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:"Courier New";color:rgb(194,194,194);background-color:rgba(0,0,0,0.95)"><span class="m_5488308493326100778m_-1693852541002432559gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_5488308493326100778m_-1693852541002432559gmail-Apple-converted-space">      </span>mirror /stats;</span></p>
<p class="m_5488308493326100778m_-1693852541002432559gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:"Courier New";color:rgb(194,194,194);background-color:rgba(0,0,0,0.95)"><span class="m_5488308493326100778m_-1693852541002432559gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_5488308493326100778m_-1693852541002432559gmail-Apple-converted-space">      </span>return 200 "OK";</span></p>
<p class="m_5488308493326100778m_-1693852541002432559gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:"Courier New";color:rgb(194,194,194);background-color:rgba(0,0,0,0.95)"><span class="m_5488308493326100778m_-1693852541002432559gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_5488308493326100778m_-1693852541002432559gmail-Apple-converted-space">    </span>}</span></p>
<p class="m_5488308493326100778m_-1693852541002432559gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:"Courier New";color:rgb(194,194,194);background-color:rgba(0,0,0,0.95);min-height:16px"><span class="m_5488308493326100778m_-1693852541002432559gmail-s1" style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p class="m_5488308493326100778m_-1693852541002432559gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:"Courier New";color:rgb(194,194,194);background-color:rgba(0,0,0,0.95)"><span class="m_5488308493326100778m_-1693852541002432559gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_5488308493326100778m_-1693852541002432559gmail-Apple-converted-space">    </span>location = /stats {</span></p>
<p class="m_5488308493326100778m_-1693852541002432559gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:"Courier New";color:rgb(194,194,194);background-color:rgba(0,0,0,0.95)"><span class="m_5488308493326100778m_-1693852541002432559gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_5488308493326100778m_-1693852541002432559gmail-Apple-converted-space">      </span>proxy_pass http://127.0.0.1:8001$uri;</span></p>
<p class="m_5488308493326100778m_-1693852541002432559gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:"Courier New";color:rgb(194,194,194);background-color:rgba(0,0,0,0.95)"><span class="m_5488308493326100778m_-1693852541002432559gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_5488308493326100778m_-1693852541002432559gmail-Apple-converted-space">    </span>}</span></p>
<p class="m_5488308493326100778m_-1693852541002432559gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:"Courier New";color:rgb(194,194,194);background-color:rgba(0,0,0,0.95)"><span class="m_5488308493326100778m_-1693852541002432559gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_5488308493326100778m_-1693852541002432559gmail-Apple-converted-space">  </span>}</span></p><p class="m_5488308493326100778m_-1693852541002432559gmail-p1" style="margin:0px;font:14px "Courier New";color:rgb(194,194,194);background-color:rgba(0,0,0,0.95);min-height:16px"><span class="m_5488308493326100778m_-1693852541002432559gmail-s1" style="font-variant-ligatures:no-common-ligatures"></span><br></p><p class="m_5488308493326100778m_-1693852541002432559gmail-p2" style="margin:0px;font:14px "Courier New";color:rgb(194,194,194);background-color:rgba(0,0,0,0.95)"><span class="m_5488308493326100778m_-1693852541002432559gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_5488308493326100778m_-1693852541002432559gmail-Apple-converted-space">  </span>server {</span></p><p class="m_5488308493326100778m_-1693852541002432559gmail-p2" style="margin:0px;font:14px "Courier New";color:rgb(194,194,194);background-color:rgba(0,0,0,0.95)"><span class="m_5488308493326100778m_-1693852541002432559gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_5488308493326100778m_-1693852541002432559gmail-Apple-converted-space">    </span>listen 8001 default_server;</span></p><p class="m_5488308493326100778m_-1693852541002432559gmail-p1" style="margin:0px;font:14px "Courier New";color:rgb(194,194,194);background-color:rgba(0,0,0,0.95);min-height:16px"><span class="m_5488308493326100778m_-1693852541002432559gmail-s1" style="font-variant-ligatures:no-common-ligatures"></span><br></p><p class="m_5488308493326100778m_-1693852541002432559gmail-p2" style="margin:0px;font:14px "Courier New";color:rgb(194,194,194);background-color:rgba(0,0,0,0.95)"><span class="m_5488308493326100778m_-1693852541002432559gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_5488308493326100778m_-1693852541002432559gmail-Apple-converted-space">    </span>location /o {</span></p><p class="m_5488308493326100778m_-1693852541002432559gmail-p2" style="margin:0px;font:14px "Courier New";color:rgb(194,194,194);background-color:rgba(0,0,0,0.95)"><span class="m_5488308493326100778m_-1693852541002432559gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_5488308493326100778m_-1693852541002432559gmail-Apple-converted-space">      </span>return 200 "OK";</span></p><p class="m_5488308493326100778m_-1693852541002432559gmail-p2" style="margin:0px;font:14px "Courier New";color:rgb(194,194,194);background-color:rgba(0,0,0,0.95)"><span class="m_5488308493326100778m_-1693852541002432559gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_5488308493326100778m_-1693852541002432559gmail-Apple-converted-space">    </span>}</span></p><p class="m_5488308493326100778m_-1693852541002432559gmail-p1" style="margin:0px;font:14px "Courier New";color:rgb(194,194,194);background-color:rgba(0,0,0,0.95);min-height:16px"><span class="m_5488308493326100778m_-1693852541002432559gmail-s1" style="font-variant-ligatures:no-common-ligatures"></span><br></p><p class="m_5488308493326100778m_-1693852541002432559gmail-p2" style="margin:0px;font:14px "Courier New";color:rgb(194,194,194);background-color:rgba(0,0,0,0.95)"><span class="m_5488308493326100778m_-1693852541002432559gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_5488308493326100778m_-1693852541002432559gmail-Apple-converted-space">    </span>location /stats {</span></p><p class="m_5488308493326100778m_-1693852541002432559gmail-p2" style="margin:0px;font:14px "Courier New";color:rgb(194,194,194);background-color:rgba(0,0,0,0.95)"><span class="m_5488308493326100778m_-1693852541002432559gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_5488308493326100778m_-1693852541002432559gmail-Apple-converted-space">      </span>return 204;</span></p><p class="m_5488308493326100778m_-1693852541002432559gmail-p2" style="margin:0px;font:14px "Courier New";color:rgb(194,194,194);background-color:rgba(0,0,0,0.95)"><span class="m_5488308493326100778m_-1693852541002432559gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_5488308493326100778m_-1693852541002432559gmail-Apple-converted-space">    </span>}</span></p><p class="m_5488308493326100778m_-1693852541002432559gmail-p2" style="margin:0px;font:14px "Courier New";color:rgb(194,194,194);background-color:rgba(0,0,0,0.95)"><span class="m_5488308493326100778m_-1693852541002432559gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="m_5488308493326100778m_-1693852541002432559gmail-Apple-converted-space">  </span>}</span></p><p class="m_5488308493326100778m_-1693852541002432559gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:"Courier New";color:rgb(194,194,194);background-color:rgba(0,0,0,0.95)"><span class="m_5488308493326100778m_-1693852541002432559gmail-s1" style="font-variant-ligatures:no-common-ligatures">

















</span></p><p class="m_5488308493326100778m_-1693852541002432559gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:"Courier New";color:rgb(194,194,194);background-color:rgba(0,0,0,0.95)"><span class="m_5488308493326100778m_-1693852541002432559gmail-s1" style="font-variant-ligatures:no-common-ligatures">}</span></p></div></div>
_______________________________________________<br>
nginx-ru mailing list<br>
<a href="mailto:nginx-ru@nginx.org" target="_blank">nginx-ru@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx-ru" rel="noreferrer" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx-ru</a></blockquote></div>
_______________________________________________<br>
nginx-ru mailing list<br>
<a href="mailto:nginx-ru@nginx.org" target="_blank">nginx-ru@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx-ru" rel="noreferrer" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx-ru</a></blockquote></div>