<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">Hi, <DIV>I'm using nginx to serve static files and proxy the dynamic requests to apache in the backend. It works very good and allowed me to free a lot of memory. Now | need to fight bandwidth staling on one of our servers and I can't solve the problem on my own. </DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>This is the vhost config:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>server { </DIV><DIV>    listen        x.x.x.x:80;</DIV><DIV>    server_name  <A href="http://www.servername.com">www.servername.com</A> <A href="http://www.otherservername.com">www.otherservername.com</A>;</DIV><DIV>    access_log  /var/log/nginx/www.servername.com.access.log  combined;</DIV><DIV>    #  vbulletin attachment rewrites</DIV><DIV>    location ~* ^.+.(attachments|customavatars|archive) {</DIV><DIV>        proxy_pass      <A href="http://apache">http://apache</A>;</DIV><DIV>        include         /etc/nginx/proxy.conf;</DIV><DIV>    }</DIV><DIV>   location ~* ^.+\.(jpg|jpeg|gif|png|ico|css|zip|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js|mov)$ {</DIV><DIV>        root  /var/www/hosts/www.servername.com;</DIV><DIV>        expires 1d;</DIV><DIV>  }</DIV><DIV>    location / {</DIV><DIV>        proxy_pass      <A href="http://apache">http://apache</A>;</DIV><DIV>        include         /etc/nginx/proxy.conf;</DIV><DIV>    }</DIV><DIV>}</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I need to redirect requests for images from specific hosts (I will compile the names every couple of days manually) to a specific file (ie. do_not_steal_bandwidth.gif). </DIV><DIV>Can you help me with this?</DIV><DIV><BR><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV>Jan Ślusarczyk</DIV><DIV><A href="mailto:jan.slusarczyk@dobrestrony.pl">jan.slusarczyk@dobrestrony.pl</A></DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR class="Apple-interchange-newline"></SPAN></SPAN> </DIV><BR></DIV></BODY></HTML>