<div class="gmail_quote">nginx/0.8.46 + PHP 5.3.3(fpm)<div><br><div>Конфиг nginx:</div><div><br clear="all"><div>server {</div><div><span style="white-space:pre-wrap">        </span>listen 80;</div><div><span style="white-space:pre-wrap">        </span>server_name ***.dev;</div>
<div><span style="white-space:pre-wrap">        </span>root /home/andrey/projects/***.dev/www;</div><div><span style="white-space:pre-wrap">        </span>error_log logs/***.error;</div><div><span style="white-space:pre-wrap">        </span>index index.php index.html index.htm;</div>
<div><br></div><div><span style="white-space:pre-wrap">        </span>error_page 502 /502.html;</div><div><span style="white-space:pre-wrap">        </span>error_page 504 /502.html;</div><div><span style="white-space:pre-wrap">        </span>location = /{</div>
<div><span style="white-space:pre-wrap">                </span>fastcgi_pass <a href="http://127.0.0.1:9999" target="_blank">127.0.0.1:9999</a>;</div><div> <span style="white-space:pre-wrap">        </span>fastcgi_index index.php;</div>
<div><span style="white-space:pre-wrap">                </span>include fastcgi.conf</div><div><br></div><div><span style="white-space:pre-wrap">                </span>fastcgi_cache one;</div><div><span style="white-space:pre-wrap">                </span>fastcgi_pass_header Cookie;</div>
<div><span style="white-space:pre-wrap">                </span>fastcgi_ignore_headers Cache-Control Expires;</div><div><span style="white-space:pre-wrap">                </span>fastcgi_cache_key "$request_uri";</div>
<div><span style="white-space:pre-wrap">                </span>fastcgi_cache_valid 30s;</div><div><span style="white-space:pre-wrap">                </span>fastcgi_cache_bypass $cookie_uid;</div><div><br></div><div>
<span style="white-space:pre-wrap">        </span>}</div><div><span style="white-space:pre-wrap">        </span>location ~ \.(jpg|jpeg|gif|png)$ {</div><div><span style="white-space:pre-wrap">                </span>error_page 404 = /pictures/index.php;</div>
<div><span style="white-space:pre-wrap">        </span>}</div><div><span style="white-space:pre-wrap">        </span>location / {</div><div><span style="white-space:pre-wrap">                </span>error_page 404 /error/404/;</div>
<div><span style="white-space:pre-wrap">                </span>rewrite ^/ag_rasprodaga.html$ /rasprodaga/ag_rasprodaga.html permanent;</div><div><span style="white-space:pre-wrap">                </span>rewrite ^/(.*)/$ /index.php?$1 last;</div>
<div><span style="white-space:pre-wrap">                </span>rewrite ^/([a-zA-Z0-9/_\-]*)$ /index.php?$1 last;</div><div><span style="white-space:pre-wrap">        </span>}</div><div><br></div><div><span style="white-space:pre-wrap">        </span>location ~ \.php$ {</div>
<div><span style="white-space:pre-wrap">        </span> fastcgi_pass <a href="http://127.0.0.1:9999" target="_blank">127.0.0.1:9999</a>;</div><div> fastcgi_index index.php;</div><div> include fastcgi.conf;</div>
<div><span style="white-space:pre-wrap">        </span>}</div><div><br></div><div>}</div><div>Задача закэшировать главную страницу не авторизованным пользователям. Кэшируется нормально;), но пока не зайдет авторизованный пользователь, далее всем не авторизованным отдаётся страница 502. </div>
<div>В error логе </div><div>2010/08/12 18:47:16 [error] 12660#0: *86 upstream prematurely closed connection while reading response header from upstream, client: 127.0.0.1, server: ***.dev, request: "GET / HTTP/1.1", upstream: "fastcgi://<a href="http://127.0.0.1:9999" target="_blank">127.0.0.1:9999</a>", host: "***.dev"</div>
<div>Подскажите куда копать? Заранее благодарен</div><div><br></div>-- <br>С уважением Andrey Petrov<br><a href="mailto:mail%3Aandreyp.kt@gmail.com" target="_blank">mail:andreyp.kt@gmail.com</a></div></div></div>