<div dir="ltr">I use <br><br>location / { <br> proxy_redirect off;<br> proxy_redirect default; <br> <br> #if ( $request_uri ~* ^.+.(css|jpg|jpeg|gif)$ ) {<br>
if ( $content_type ~* css ) {<br> expires 1h;<br> <br> }<br> <br> proxy_pass <a href="http://my_upstream">http://my_upstream</a>; <br> <br>
}<br><br>but it does not work.<br><br>when I use $request_uri the browser get error response. It seems the nginx box reset the tcp connection.<br>when I use $content_type no Expires head returned by nginx.<br><br>
<div class="gmail_quote">2008/8/15 Igor Sysoev <span dir="ltr"><<a href="mailto:is@rambler-co.ru">is@rambler-co.ru</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="Wj3C7c">On Fri, Aug 15, 2008 at 05:42:06PM +0800, Delta Yeh wrote:<br>
<br>
> I want to use "expires" directive to decrease the sever load.<br>
> My question is if there is no Expires head from the backend server , does<br>
> nginx add such head?<br>
<br>
</div></div>nginx's expires overrides backend headers.<br>
<font color="#888888"><br>
<br>
--<br>
Igor Sysoev<br>
<a href="http://sysoev.ru/en/" target="_blank">http://sysoev.ru/en/</a><br>
<br>
</font></blockquote></div><br></div>