Skip to main content

Setup AWS Cloudfront




Amazon CloudFront  is used to improve the performance of your website. CloudFront makes your website's files (such as HTML, images, and video) available from data centers around the world (called edge locations). When a visitor requests a file from your website, the request is automatically redirected to a copy of the file at the nearest edge location, which results in faster download times than if the visitor had requested the content from a data center farther away.

This Guide shows you how to setup cloudfront to help you website performance .

Cloudfront distribution  - We need to create cloudfront distribution first to make our website available from data centers around the world.

Today we will create cloudfront for our website which is hosted in an ec2 instance behind aws elb. 

  Origin Setting  

              Origin Domain Name - click on box and select your elb 
              Origin Path - leave this blank
              Origin ID - It will automatically assigned.
              Origin SSL Protocols -  Select as per your need ( preferred select all).
              Origin Protocol Policy - Select in which mode you want to serve you visitors or select match viewer.

HTTP Port -  80
HTTPS Port -  443 
Origin Custom Headers - leave this blank.

 Default Cache Behavior Settings -


Viewer Protocol Policy - Select as per your requirement.

Allowed HTTP Methods - as per your requirement.

Cached HTTP Methods -  as per your requirement.

Forward Headers -  as per your requirement.

Object Caching - if you are not sending cache behavior with your header or your web server then select Customize.
 now put ttl value as per your caching requirement eg. for how much time you want to cache your object.

all other option leave default .

Distribution Settings



Price Class - Use as from where website visitor access you website if you have a worldwide visitor base you need to use all edge locations.

Alternate Domain Names - put your domain name from which you want to access your website eg. www.adityabaghel.com.

SSL Certificate - if you want to access your website with https so you need to upload ssl certificate in IAM for cloudfront  ( Optional)


Default Root Object - Set to index.php or index.html . This page is the default page that the CloudFront distribution returns if the URL used to access the distribution doesn't contain a file name

Logging -  if you want log of cloudfront then use this or leave this off.

Distribution State - Enabled 

Click Create Distribution.

It can take up to 15 minutes to deploy the distribution. To view the current status of the distribution, find it in the console and check the Status column. A status of InProgress indicates that the distribution is not yet fully deployed.

When your distribution is deployed, you are ready to reference your content with your new CloudFront domain name. Make a note of the value of Domain Name in the CloudFront console. You'll need this value in the next step. In this example, the value is 
dj4p1rv6mvubz.cloudfront.net.  


Now that you have successfully created a CloudFront distribution, the next step is to update the CNAME record to point your domain www.adityabaghel.com( then value we use in cloudfront while creating )  to - dj4p1rv6mvubz.cloudfront.net.


Cheers now you have working cloudfront distribution which help you to increase you website performance.

please connect me if you need more detailed help in setup your first at bagheladitya[at]yahoo[dot]com.

Comments

Popular posts from this blog

how to take mails backup in outlook 2007

How to take backup of mails in outlook 2007. there is a very simple way to taking backup of mails 1.Opne outlook 2007 > tools >account > data files >open folder then close all other windows and copy outlook.pst file in a safe location To restore backup 1.Opne outlook 2007 > tools >account > data files > add > and give the location of outlook.pst file.

Configure Vsftpd with virtual users in Ubuntu 14.04

vsftpd is a GPL licensed FTP server for UNIX systems, including Linux. It is secure and extremely fast. It is stable. Don't take my word for it, though. Below, we will see evidence supporting all three assertions. We will also see a list of a few important sites which are happily using vsftpd. This demonstrates vsftpd is a mature and trusted solution. To configure vsftpd server  with virtual users we need to enable PAM for vsftpd. apt-get install vsftpd libpam-pwdfile Now configure vsftpd to use PAM authentication vim  /etc/vsftpd.conf then paste in the following listen=YES anonymous_enable=NO local_enable=YES write_enable=YES local_umask=022 local_root=/var/www chroot_local_user=YES allow_writeable_chroot=YES hide_ids=YES #virutal user settings user_config_dir=/etc/vsftpd_user_conf guest_enable=YES virtual_use_local_privs=YES pam_service_name=vsftpd nopriv_user=vsftpd guest_username=vsftpd Now create users - You can either use a data...

AWS Certification RoadMap