Hi All, 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. We have a separate DB server that I'm thinking of off loading the MP3 traffic to, so essentially I'd like to do the following: 1. Install Nginx on DB server 2. Add rule to re-route all mp3 requests to the db server (1) I can handle (2) I'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. Thanks all!!!
on 2009-03-03 22:59
on 2009-03-04 02:22
rewrite ^/media/(.*\.mp3)$ http://db.domain.com/mp3s/$1 last; 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). You can find more rewrite examples here: http://wiki.codemongers.com/NginxHttpRewriteModule#rewrite