如何修复Nginx URL路由到S3错误

我正在使用wpengine(wordpress)服务器上的Nginx url规则将域路由到我的s3存储桶,其中dns从cloudflare指向该服务器。

我的存储桶文件当前位于 https://cgla.s3.amazonaws.com/documents/

,我想将所有流量引向

https://cg-la.com/documents/

到此存储桶。

我添加了Nginx规则

location /documents/ {
proxy_pass https://cgla.s3.amazonaws.com/documents/;
}

但是在向网址添加路径时,我总是收到404错误。

我希望举例

此: https://www.cg-la.com/documents/gvipbanner.jpg

应链接到此: https://cgla.s3.amazonaws.com/documents/gvipbanner.jpg

使用我添加的规则,但没有,出现nginx 404错误。

除了将规则添加到wpengine之外,我是否还缺少其他任何步骤?

xiaojiankunzhuxi 回答:如何修复Nginx URL路由到S3错误

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3122032.html

大家都在问