cs_root_host 设置正确:
grep root_host /var/lib/riak-cs/generated.configs/app.2015.07.09.13.59.07.config
{cs_root_host,"s3.example.com"},
但是当我上传文件时:
s3cmd put test.jpg s3://images --acl-public
我得到回报:
对象的公共 URL 是:http://images.s3.amazonaws.com/test.jpg
问题出在哪里?
补充:这是输出 - 一切看起来都很好,除了最后一行:
(example.com 只是替换我不想公开的真实域)
s3cmd -d -c .s3cfg put newfile.jpg s3://images --acl-public
调试:ConfigParser:读取文件'.s3cfg'
调试:ConfigParser:access_key->YD...17_chars...U
调试:ConfigParser:bucket_location->RU
调试:ConfigParser:cloudfront_host->cloudfront.amazonaws.com
调试:ConfigParser:cloudfront_resource->/2010-07-15/distribution
调试:ConfigParser:default_mime_type->binary/octet-stream
调试:ConfigParser:delete_removed->False
调试:ConfigParser:dry_run->False
调试:ConfigParser:编码-> UTF-8
调试:ConfigParser:加密->假
调试:ConfigParser:follow_symlinks->False
调试:ConfigParser:强制->假
调试:ConfigParser:get_continue->False
调试:ConfigParser:gpg_command->/usr/bin/gpg
调试:ConfigParser:gpg_decrypt->%(gpg_command)s -d --verbose --no-use-agent --batch --yes --passphrase-fd %(passphrase_fd)s -o %(output_file)s %(input_file )s
调试:ConfigParser:gpg_encrypt->%(gpg_command)s -c --verbose --no-use-agent --batch --yes --passphrase-fd %(passphrase_fd)s -o %(output_file)s %(input_file )s
调试:ConfigParser:gpg_passphrase->...-3_chars...
调试:ConfigParser:guess_mime_type->True
调试:ConfigParser:host_base->s3.example.com
调试:ConfigParser:host_bucket->%(bucket)s.s3.example.com
调试:ConfigParser:human_readable_sizes->False
调试:ConfigParser:list_md5->False
调试:ConfigParser:log_target_prefix->
调试:ConfigParser:preserve_attrs->True
调试:ConfigParser:progress_meter->True
调试:ConfigParser:proxy_host->127.0.0.1
调试:ConfigParser:proxy_port->80
调试:ConfigParser:递归->假
调试:ConfigParser:recv_chunk->4096
调试:ConfigParser:reduce_redundancy->False
调试:ConfigParser:secret_key->kG...37_chars...=
调试:ConfigParser:send_chunk->4096
调试:ConfigParser:simpledb_host->sdb.amazonaws.com
调试:ConfigParser:skip_existing->False
调试:ConfigParser:socket_timeout->10
调试:ConfigParser:urlencoding_mode->normal
调试:ConfigParser:use_https->False
调试:ConfigParser:详细程度->警告
调试:更新 Config.Config 编码 -> UTF-8
调试:更新 Config.Config follow_symlinks -> False
调试:更新 Config.Config 详细程度 -> 10
调试:使用 UTF-8 对“put”进行统一编码
调试:使用 UTF-8 对“newfile.jpg”进行统一编码
调试:使用 UTF-8 对 's3://images' 进行统一编码
调试:命令:放
信息:正在编译本地文件列表...
调试:使用 UTF-8 对 u'' 进行 DeUnicodising
调试:使用 UTF-8 对 u'newfile.jpg' 进行 DeUnicodising
调试:使用 UTF-8 对“newfile.jpg”进行统一编码
调试:使用 UTF-8 对“newfile.jpg”进行统一编码
信息:应用--exclude/--include
调试:检查:newfile.jpg
调试:通过:newfile.jpg
INFO:摘要:要上传的 1 个本地文件
调试:内容类型设置为“图像/JPEG”
调试:字符串“newfile.jpg”编码为“newfile.jpg”
调试:SignHeaders:'PUT\n\nimage/jpeg\n\nx-amz-acl:public-read\nx-amz-date:Fri, 10 Jul 2015 09:55:37 +0000\n/images/newfile。 jpg'
调试:CreateRequest:资源[uri]=/newfile.jpg
调试:使用 UTF-8 对“newfile.jpg”进行统一编码
调试:SignHeaders:'PUT\n\nimage/jpeg\n\nx-amz-acl:public-read\nx-amz-date:Fri, 10 Jul 2015 09:55:37 +0000\n/images/newfile。 jpg'
newfile.jpg -> s3://images/newfile.jpg [1 of 1]
调试:get_hostname(图像):images.s3.example.com
调试:format_uri():http://images.s3.example.com/newfile.jpg
32600 of 32600 100% in 0s 14.49 MB/sDEBUG:响应:{'status':200,'headers':{'content-length':'0','server':'nginx','connection':'keep -alive', 'etag': '"89e39f454c69a1ce1fadec3a222fc292"', 'date': 'Fri, 10 Jul 2015 09:55:37 GMT', 'content-type': 'text/plain'}, 'reason': '好的','数据':'','大小':32600}
32600 of 32600 100% in 0s 391.54 kB/s 完成
调试:MD5总和:计算= 89e39f454c69a1ce1fadec3a222fc292,收到=“89e39f454c69a1ce1fadec3a222fc292”
对象的公共 URL 是:http://images.s3.amazonaws.com/newfile.jpg