网络技术 阿里云项目部署

【转】阿里云oss错误:Forbidden access to the original image

好长时间没看网站了,今天突然发现了一个问题就是所有的图片都看不到了。如图:

遇到这种问题的时候,不要慌,因为oss涉及了多层通讯,需要先排查问题。我先看了一下http状态码。我用的是chrome浏览器,按Ctrl+Shift+i调出控制台,点击network,展示如下图,可以看到图片文件是403,也就是说这个文件还在,地址也正确,但是访问这个地址请求不到这个资源,那就是被禁止了。这样一来,原因就能通过一个状态码来分析出来,排查的范围就大大缩小了。

首先,php.ini、nginx.conf包括mysql那边我都没改过。这个问题出现的也是非常突然。那么我觉得问题就在阿里云oss的配置上,oss的配置有站内和站外,站内就是WordPress的插件,站外就是阿里云oss的控制台。我先打开了WordPress的插件,验证了AccessKey信息正确,域名正确,路径正确,ssl正确,oss也没用cdn。网站上是从没改过的,这就可以排除oss插件配置是正常的。

 

我在新窗口中打开了状态码为的403图片

在message中看到了一句[Forbidden access to the original image],不用一个词一个词的解释了,这句话意思是禁止访问原始图像。原始图像(original image),我记得oss控制台里面有这个选项近似的意思,果然找到了。正确的步骤如下

  1. 登陆阿里云oss控制台https://oss.console.aliyun.com
  2. 选择bucket
  3. 图片处理
  4. 访问设置
  5. 关闭原图保护
  6. 回到站内Ctrl+F5刷新,或Ctrl+Shift+i打开Network勾选Disable Cache刷新。

5 thoughts on “【转】阿里云oss错误:Forbidden access to the original image

  1. I think what you posted made a ton of sense. However, think about this, suppose you were
    to create a awesome headline? I mean, I don’t
    wish to tell you how to run your website, but what if you added a headline
    that makes people want more? I mean 【转】阿里云oss错误:Forbidden access to the original image – 时间爱人 is
    a little boring. You should glance at Yahoo’s
    front page and see how they create post headlines to get people
    to open the links. You might add a video or a
    pic or two to grab readers interested about what you’ve written. Just my opinion, it
    could make your website a little livelier.

    my homepage – coupon (poisonfind46.booklikes.com)

  2. Everything published was actually very logical.
    However, what about this? suppose you wrote a catchier post title?
    I ain’t saying your information is not good., however what if you
    added something that grabbed a person’s attention? I mean 【转】阿里云oss错误:Forbidden access to the
    original image – 时间爱人 is kinda vanilla. You ought to peek
    at Yahoo’s home page and see how they create article titles to
    get people to open the links. You might try adding a video or
    a related picture or two to grab people excited about everything’ve written. Just my opinion, it
    might bring your website a little livelier.

    Here is my blog :: code (writeablog.net)

  3. I think what you typed made a great deal of sense.

    However, think about this, suppose you wrote a catchier post title?

    I mean, I don’t want to tell you how to run your website,
    but suppose you added a title to possibly grab folk’s attention? I mean 【转】阿里云oss错误:Forbidden access to the original image –
    时间爱人 is kinda boring. You ought to look at Yahoo’s front page and watch how they create
    news titles to get viewers interested. You might add a video or a picture
    or two to grab readers excited about what you’ve got to say.
    Just my opinion, it would make your posts a little livelier.

    Feel free to visit my blog :: code (pastebin.pl)

  4. I think that everything published was very reasonable.
    But, think about this, what if you added a little information?
    I mean, I don’t wish to tell you how to run your website,
    however suppose you added something that makes people desire more?
    I mean 【转】阿里云oss错误:Forbidden access to the original image –
    时间爱人 is kinda boring. You could glance at Yahoo’s front page and watch how they create news
    headlines to get people interested. You might add a
    video or a pic or two to get readers excited about everything’ve written. In my opinion, it
    would bring your blog a little bit more interesting.

    my webpage :: coupon (https://pastebin.pl/view/e39f0a2f)

  5. 总感觉有些功能不知道是不成熟还是什么原因,用了就会有各种问题。CDN中也有些功能用了就会出问题。阿里云这个OSS的原图保护应该还是比较给力的,就是不知道为什么会有问题

发表评论

电子邮件地址不会被公开。 必填项已用*标注

返回顶部