What Is Amazon CloudFront CDN ?
CloudFront Amazon web service which used to Sppeding up websites and this is easy wins setting up your magento store to you AMAZON CDN . CDN can be used to deliver static files js , css , images or content deliver from global network of edge locations .
Cloudfront caches content on servers across the entire would , and serves content tp your customers near by on their location , resulting is an overall faster page load . it’s low cost
pay only for what you use Visit http://aws.amazon.com/cloudfront/pricing/ to get more information about pricing.
Integration
Integration takes 15-50 min , depending on your knowledge
For setup cloudfront you’ll need an AWS account . Once you’ve set up your acccount , got AWS Managment Console and Select Aws Cloudfront http://console.aws.amazon.com/cloudfront/home .
1. Click On Create Distribution. this will start yout process of creating custon CDN For Your MAGENTO site .
2. You’ll wanto to create a ‘Web’ Distribution For Speed up distribution of static and dynamic content . Select web and click on Get Started
ORIGIN NAME : Yourdomainname.com
Origin ID: The Origin ID is an AWS internal ID, it won’t be used except to identify the distribution, but should be unique
Origin Protocol Policy : HTTP Only
HTTP Port: 80
HTTPS Port : 443
CLick On Continue
Creating Default Behavior
Path Pattren : Deafault(*)
Origin : origin-yoursite.com
Viewer Protcol Policy : HTTP and HTTPS
Object Caching : Use Origin Cache Headers
Forward Quert Strings : No
Distribution Setup
Alter DOmain Name (CNAMEs) : THis Field Is Not Required . If you want use your own doamin name insted of the AWS CloudFront Domain Name For The Url Enter There . cdn.yourwebsite.com
Click On Continue Now CLoudfront will take 15mins for setup. status of your distribution will change from “in Progress” to “Deployed” in the cloudfront dashboard.
cloudfrontid.cloudfront.net
youcan use this domain to deliver conttent or your configuerd(cdn.yousite.com)
Config CNAME Record
Go to You Cpanel Click On Simple DNS Zone Editor in Add A CNAME Record .
Name – cloudfrontid.cloudfront.net
CNAME – cdn.yousite.com
Click Add CNAME Record
Configure Magento
Go To Magento Admin Panel -> System -> Configuration -> Web-> Unsecure
Base Skin Url – http://cdn.yoursite.com/skin/
Base Media Url – http://cdn.yoursite.com/media/
Base JavaScript Url – http://cdn.yoursite.com/js/
Go To Magento Admin Panel -> System -> Configuration -> Web-> secure
Base Skin Url – https://cdn.yoursite.com/skin/
Base Media Url – https://cdn.yoursite.com/media/
Base JavaScript Url – https://cdn.yoursite.com/js/
After Changes This Refresh Site Cache And Check Your Site If Css Not Loding Properly (Your website not loding well) . go to magento root folder after go to your theme stylesheet.css(yoursite css) change all url (/css/) to full domain name (http://yoursite.com/css/) change all url in css file again refresh your site cache and check again . if your are facing again problem comment please i will help you
In some days i write about maxcdn too.|
Read this too:
1 Comment
Nikul
hello,
Thanks for your guide!
I want to know how can I setup this for my staging site with subdomain?
I have made all changes. Admin is working fine but in front css/js files are not loading.
What should I make settings in Amazon CloudFront and my magento admin to make it working with subdomain.
Thanks in advanced!