Prerequisite: XenForo 1.1.4+ [bd] Attachment Store 0.9.5+ Step 1. Obtain Amazon Web Services Security Credentials Go to https://portal.aws.amazon.com/gp/aws/securityCredentials and login. You may need to create a new one if you haven't had an Amazon account. Click the "Create a new Access Key" link to create a new key pair. Please note that Amazon only allow 2 key pairs per account so you will not see the create link if your account has already reached the limit. Step 2. Create an Amazon S3 bucket Go to https://console.aws.amazon.com/s3/home and sign up for the service if asked. Click the "Create Bucket" button and start fill in the bucket name and select a region for your bucket. A few things to remember: If you plan to use subdomain link for the attachment, you need to enter the subdomain as your bucket name. For example, for this website I want to access the attachment via the subdomain attachments.xfrocks.com, I will use it as the bucket name. You should select the region closest to your primary audience for best result. The cost for each region is different, so take that into account when you decide too. More information here. Step 3. Configure [bd] Attachment Store Go to AdminCP > Home > Options > Attachments, look for the option [bd] Attachment Store and select "Store files in Amazon S3". You will need to fill out the key ID and secret from step 1. The bucket name and region from step 3. You can optionally change the "Protocol" if you don't want it to be auto-detected: by default, the S3 link will use the same protocol (https or http) as your page to prevent security warnings. Step 4. Configure subdomain/CloudFlare If you decided to follow the subdomain approach, you can use CloudFlare free service to reduce the Amazon S3 cost by routing requests through CloudFlare before they hit Amazon servers. If you don't use CloudFlare, you still need to configure your subdomain or your attachment links will not work. Below is the instruction to set it up with CloudFlare. Go to https://www.cloudflare.com/my-websites and click "DNS Settings" for your website. Create a new CNAME record with your subdomain as the name and <bucket-name>.s3.amazonaws.com as the value. Make sure you enable CloudFlare for the new subdomain (the orange cloud). Upon saving, it should look like this: And you are done! All images in this HOWTO are attachments served via Amazon S3/CloudFlare.
For using sub-domain as the bucket name in your illustration i.e. " attachments.xfrocks.com", do we need to create the sub-domain "attachements" in our web hosting cpanel?
xfrocks @hlchia You do not need to create it in your hosting server but you must create the subdomain record either via your domain manager or via CloudFlare (if you use their service).
xfrocks @hlchia I don't have CPanel to guide you personally but I think this official document should work: http://docs.cpanel.net/twiki/bin/view/AllDocumentation/CpanelDocs/SubDomains
Andy: you may want to read this https://xfrocks.com/other/threads/howto-xenforo-attachments-via-amazon-s3-and-cloudfront.60/? [HOWTO] XenForo attachments via Amazon S3 and CloudFront Prerequisite: XenForo 1.1.4+ [bd] Attachment Store 0.9.7+ Step 1. Obtain Amazon Web Services Security Credentials + CloudFront Key Pair Follow step 1... xfrocks.com
MattW @RoldanLT You get 50GB of storage space as well http://www.cdn77.com/cdn-storage CDN Features | CDN77.com Explore CDN77’s platform features, including website and application performance, security, and client-tailored solutions. cdn77.com
xfrocks @BamaStangGuy Yes, you can do that. But Amazon stated that S3 is a storage solution, serving straight from S3 may not be the best idea for performance.
Mình thục hiện tất cả các bước như trên ok hết rồi nhưng thấy vẫn bình thường không biết addon đã hoạt động chưa. Mình hỏi thêm là đính kèm chuyển qua amazon bên đó họ lưu ở chô nào mình có thể quản lý được không và không gian ổ đia bên đó họ cấp cho mình như thế nào? Mình có phải làm theo hướng dẫn bài này nưa không cloudfront.60? Hay chỉ sử dụng 1 trong hai cái cloudfront or CloudFlare Thanks you.
xfrocks @thienbui Chỉ sử dụng hoặc CloudFront hoặc CloudFlare thôi bạn nhé. Với file cũ bạn phải chạy rebuilder để cập nhật nơi lưu mới cho nó. Các file mới upload sau khi cấu hình add-on thì sẽ đúng chỗ luôn.
kappadox @xfrocks All problems fixed. Only but I not make CloudFlare settings. I'm having DNS issues and Step 4. Configure subdomain/CloudFlare I did not set
xfrocks @kappadox Have you been able to add your domain into CloudFlare? You will need to change your name server with your domain registrar for that FYI.
yes add my domain CloudFlare? But dont change NS1 and Ns2 (ram.ns.cloudflare.com) (val.ns.cloudflare.com), But Create a new CNAME record with my subdomain
I will not use CloudFlare because it is a new site. The plugin is nice and thanks very much for working well.