Hello,
Problem: Drupal hosted on a VPS and files(images/css/pdfs etc) served from amazon S3
I'm aware of CDN module, but instead of rewrite urls I would like to instruct nginx to serve amazon s3 files transparently. Is it possible ?
It seems to be a basic question, but I wasn't able the setup this and didn't find any reference/info/howto/tips on this.
Does somebody has an idea of what could be wrong ?
location /system/files/ {
resolver MY_DNS_SERVER;
rewrite ^/system/files/(.*)$ static/$1;
proxy_next_upstream error timeout http_500 http_502 http_503 http_504;
proxy_set_header Authorization '';
proxy_set_header Host MY_BUCKET.s3.amazonaws.com;
proxy_pass_request_body off;
proxy_set_header Content-Length '';
proxy_set_header Accept-Encoding "";
# disable buffering
proxy_buffering off;
proxy_max_temp_file_size 0;
proxy_pass http://MY_BUCKET.s3.amazonaws.com;
break;
}
++
Marc