rackspace

How can I use boto to stream a file out of Amazon S3 to Rackspace Cloudfiles?

风格不统一 提交于 2019-11-26 10:29:24
问题 I\'m copying a file from S3 to Cloudfiles, and I would like to avoid writing the file to disk. The Python-Cloudfiles library has an object.stream() call that looks to be what I need, but I can\'t find an equivalent call in boto. I\'m hoping that I would be able to do something like: shutil.copyfileobj(s3Object.stream(),rsObject.stream()) Is this possible with boto (or I suppose any other s3 library)? 回答1: The Key object in boto, which represents on object in S3, can be used like an iterator

Nginx no-www to www and www to no-www

妖精的绣舞 提交于 2019-11-26 00:10:08
问题 I am using nginx on Rackspace cloud following a tutorial and having searched the net and so far can\'t get this sorted. I want www.mysite.com to go to mysite.com as normal in .htaccess for SEO and other reasons. My /etc/nginx/sites-available/www.example.com.vhost config: server { listen 80; server_name www.example.com example.com; root /var/www/www.example.com/web; if ($http_host != \"www.example.com\") { rewrite ^ http://example.com$request_uri permanent; } I have also tried server { listen