• Resolved onerock

    (@onerock)


    I have just implemented both w3-total-cache and Amazon S3. I have configured the CDN portion and successfully uploaded the files via the plugin. When I enable the “Host Attachments”, “Host wp_includes/files”, and “Host Theme Files” as well as enable the CDN feature under the general tab, my site appears “broken.” When I disable the individual CDN features, my site looks correct. What am I missing to make this work? thanks in advance for your help.

    http://wordpress.org/extend/plugins/w3-total-cache/

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter onerock

    (@onerock)

    This issue has been resolved. First, my CNAME and bucket name weren’t correctly formed. The bucket name must be in the form of something like cdn.your_domain.com and the CNAME must be the same as what you have chosen before the first dot and points to s3.amazonaws.com. This translates to cdn.your_domain.com.s3.amazonaws.com. Secondly, you must at least assign a bucket permission “View Permissions” to “everyone.” There may be ways to restrict this further, but I am not currently aware

    Thread Starter onerock

    (@onerock)

    Correction… the CNAME points to the name assigned by Amazon. It is usually a long string of alpha numerics and looks similar to this. alpha_numeric.s3.amazonaws.com

    mohanbn

    (@mohanbn)

    Well, with both the settings, i get to see the calls in html as cdn.domain.com for all images instead of cdn.domain.com/x.png or cdn.domain.com/y.jpg

    The HTML itself is being malformed. Any solutions for this?

    Thread Starter onerock

    (@onerock)

    Have you enabled all of the setting in the W3 Total Cache plugin for CDN? There is a “Host custom files” section under CDN, that must specify what folders you want to be “redirected”. This is what add the remainder of the html link.

    Thread Starter onerock

    (@onerock)

    The link that is posted appears to go to the Amazon home page. Please re-post.

    I have the same result as mohanbn. This seems to be if only using S3 and NOT Amazon Cloudfront as the CDN.
    Instead of pulling the file in cdn.domain.com/picture.jpg it generates html as cdn.domain.com. It doesn’t fill the folder or file in the rendered html.

    Thread Starter onerock

    (@onerock)

    This is because Amazon S3 is a push technology and not a pull technology like Cloudfront. Below are a couple of good articles that helped me understand the difference.

    CDNs – push vs pull
    Amazon S3 vs Amazon Cloudfront

    I haven’t messed much with Clouldfront, yet, but I will be once I get my site fully implemented/functional. For S3 to work this is what I did…

    Under the main W3 Total Cache admin page, scroll down to the CDN section and select “Amazon Simple Storage Service (S3)”. Do not enable yet.

    Under the W3 Total Cache admin, go to CDN tab. In the general section, under :Host custom files” must be enabled. Under the “Configuration”, obviously the Amazon S3 info must be filled in. 🙂 In the “advanced section, the “Custom file list:” must include the ftp directory of the files you want served from S3. I use the Nextgen Gallery plug in so I had to include “wp-content/gallery/*” in my list. That may be a default now, but not sure.

    You can now use the buttons in the general section to upload your files to Amazon S3. The “Upload Custom Files” didn’t work for me because my gallery is somewhere in the neighborhood of 2 gigs and I am sure that it wasn’t designed for such a large load. I manually move my files with 3rd party sync software.

    After your files are uploaded to Amazon S3, you can enable the entire CDN feature on the main

    Onerock,
    That may be the problem. I set up a subdomain a while back to host my images. So I have subdomain.domain.com/uploads as the current hosting of images. Now, since WordPress recognized that as my uploads directory W3 uploaded all the images into S3 without any problem. The issue is displaying them.
    So, if what I’m reading is correct, I need to add that directory (subdomain and directory) to the Custom File List in the Advanced section of the CDN settings. Is that correct?

    Thanks for the follow up.

    Also, I should add, even though I’m using subdomain.domain.com/upload as my upload directory, W3 uploaded the files to S3 in the name.s3.amazonaws.com/uploads directory. I don’t know if that matters.
    Thanks.

    Thread Starter onerock

    (@onerock)

    I would try putting that in the custom file list. It is interesting that it recognizes them for the upload feature, but isn’t substituting the CDN portion of the URL.

    My problem isn’t the custom files. The problem is the uploads. As I said, I use the domain z.domain.com/uploads to hold all my uploaded media through WordPress. All my links in the posts, etc, are http://z.domain.com/uploads/file.jpg.
    When I activate the CDN, the CSS is working fine and pulling from cdn.domain.com/folder/file
    It’s only having issues with the images that pull from z.domain.com/uploads.

    Maybe I’m misunderstanding what the purpose of the custom uploads option is for but I don’t know if it applies to what I want to do. This should be working with the upload attachments option.
    Thanks.

    Thread Starter onerock

    (@onerock)

    I agree that it should be working as is. I was suggesting adding it in to the custom section to see if that had any affect.

    Demlaip

    (@jointwebblog)

    Thanks onerock, but I’m still facing this issue, even though I followed your suggested naming convention of bucket.
    Problem is: some icons on site UI are broken and some resources of site are pointing to their ‘gzip files, which disappear once I disable CDN in W3TC.
    Hence it would be great help to get your some words on this.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘[Plugin: W3 Total Cache] Amazon S3 images not being served.’ is closed to new replies.