WordPress.org

Ready to get started?Download WordPress

Forums

My CDN: Cloudfront images won't load (7 posts)

  1. dangadd
    Member
    Posted 3 years ago #

    I've got a WordPress (3.1) site, and I'm trying to use s3 and cloudfront to host and serve images, css files and other site content. I'm using the 'my cdn' plugin to rewrite the links on my site. I've set up a distribution from my s3 folder to cloudfront, and the cloudfront management console shows that the distribution is working. I can see that all of the files are in the correct s3 bucket. However, I can't get any files to load when the links are changed on my site to include my new cloudfront domain. I can load an image from s3 into a browser when I pass the aws access key and other info into the browser, but the images won't load directly from s3 or cloudfront, for instance:

    https://s3.amazonaws.com/itnog-content/wp-content/uploads/2011/03/gadd_g_FULL.gif

    http://d35yk3eosgccov.cloudfront.net/wp-content/uploads/2011/03/gadd_g_FULL.gif

    As I mentioned, I'm using the 'my cdn' plugin to rewrite the links, and 'wp super cache' for caching. I don't think that those plugins are the issue, but at this point I'm not sure what the issue is.

  2. dangadd
    Member
    Posted 3 years ago #

    Anyone know if this is a common issue?

  3. raboo
    Member
    Posted 3 years ago #

    It's very simple, you need to set the files to public. I got an access denied message when I clicked on that gif.

    For further reading on S3 Amazon and its usage, check out the tutorials in this category: http://www.miracletutorials.com/category/s3-amazon-cloudfront/

    I hope that helps?

  4. dangadd5600
    Member
    Posted 3 years ago #

    Thanks Raboo,
    I had been trying that, but it the process would never run all the way through for the entire bucket. It would get a few files deep and error out. But that is the solution. I made just the file mentioned in this post public, and that file now loads, as you'll see if you click on that link. Any idea why the process won't run for the entire bucket? Am I going to have to manually make each file public every time I upload content?

  5. raboo
    Member
    Posted 3 years ago #

    With CloudBerry S3 Explorer from http://www.cloudberrylab.com you can set permission attributes for a bucket and all its files and folders in one go. Right click on your bucket, select ACL settings, tick the box Apply to all files and folders and then set the permission.

    If that doesn't work, it normally should, you can set a policy for your bucket so that all items are forced to accept the same settings. But that is quite advanced stuff.

  6. raboo
    Member
    Posted 3 years ago #

    I forgot to say: You can start out with the freeware version of CloudBerry:
    http://www.cloudberrylab.com/?page=cloudberry-explorer-amazon-s3

    For policies, you need to buy the pro version. Hopefully it doesn't come to that for you.

  7. dangadd
    Member
    Posted 3 years ago #

    Hey Raboo,
    Thanks for following up. I actually did just that yesterday shortly after reading your first reply. Worked perfectly. Thanks for the help!

Topic Closed

This topic has been closed to new replies.

About this Topic