rewrite  ^/media/(.*\.mp3)$  <a href="http://db.domain.com/mp3s/$1">http://db.domain.com/mp3s/$1</a>  last;<br><br>If updating the code that makes these request (i.e., the website or .swf) is an option, then it might be better to go ahead and direct these MP3 requests to your secondary server.  Also might be worth looking into a content delivery network (CDN), or a basic asset host (Amazon S3 offers both).<br>
<br>You can find more rewrite examples here:<br><a href="http://wiki.codemongers.com/NginxHttpRewriteModule#rewrite">http://wiki.codemongers.com/NginxHttpRewriteModule#rewrite</a><br><br><div class="gmail_quote">On Tue, Mar 3, 2009 at 3:48 PM, Ilan Berkner <span dir="ltr">&lt;<a href="mailto:iberkner@gmail.com">iberkner@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>Hi All,</div>
<div> </div>
<div>Currently we are doing a lot of MP3 transfers on our webserver (downloads) and this month we exceeded our bandwidth, which is fine, but can be costly.</div>
<div> </div>
<div>We have a separate DB server that I&#39;m thinking of off loading the MP3 traffic to, so essentially I&#39;d like to do the following:</div>
<div> </div>
<div>1. Install Nginx on DB server</div>
<div>2. Add rule to re-route all mp3 requests to the db server</div>
<div> </div>
<div>(1) I can handle (2) I&#39;m not sure about.  If anyone could clue me in on how to write the configuration rule for routing the .mp3 files that would be great.</div>
<div> </div>
<div>Thanks all!!!</div>
</blockquote></div><br>