Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/amazon-s3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何为nginx提供bucket路径?_Nginx_Amazon S3_Nginx Location - Fatal编程技术网

如何为nginx提供bucket路径?

如何为nginx提供bucket路径?,nginx,amazon-s3,nginx-location,Nginx,Amazon S3,Nginx Location,我正在尝试向现有网站添加新网页。这些网页(.html)存储在s3存储桶中。当我在nginx上更新配置时,我得到指定的bucket不存在的错误 以下是配置代码: location ~ ^/biz/(.*)$ { resolver 8.8.8.8; set $bucket "womply-test-bucket.s3-us-west-2.amazonaws.com"; proxy_pass http://$bucket/$1; } 点击url时出错: <Error&g

我正在尝试向现有网站添加新网页。这些网页(.html)存储在s3存储桶中。当我在nginx上更新配置时,我得到指定的bucket不存在的
错误

以下是配置代码:

location ~ ^/biz/(.*)$ {
    resolver 8.8.8.8;
    set $bucket "womply-test-bucket.s3-us-west-2.amazonaws.com";
    proxy_pass http://$bucket/$1;
}
点击url时出错:

<Error>
<Code>NoSuchBucket</Code>
<Message>The specified bucket does not exist</Message>
<BucketName>womply.com</BucketName>
html页面不在
womply.com
而且不确定nginx从何处获取bucket名称

任何帮助都将不胜感激。谢谢