From e23a925411e08e31c6d53cb489ce848833b01e14 Mon Sep 17 00:00:00 2001 From: dumpfmprod Date: Fri, 6 Aug 2010 03:09:21 -0400 Subject: Added amazon s3 routing --- conf/nginx.conf | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 3e6cbe5..44967bb 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -32,8 +32,13 @@ http { client_max_body_size 15m; location ~* /(avatars|images)/ { + if (!-f $request_filename) { + rewrite ^(.*)$ http://dumpfm.s3.amazonaws.com$1 permanent; + break; + } + root /home/dumpfmprod/prod; - expires 30d; + expires 30d; } location ~* /static/ { -- cgit v1.2.3-70-g09d2