title: CloudFront issue when using Load Balancer and Route 53
body: <p>My idea is to use cloudfront to cache <em>one</em> entire site that is in EC2. But I am having a lot of trouble to do that. If I set the cloudfront option <strong>Forward Headers</strong> to <strong>none</strong>, the default index.html from apache is cached (probably because the CF is caching the LB URL). If I set <strong>Forward Headers</strong> to <strong>whitelist</strong> and add <strong>host</strong> in <strong>Whitelist Headers</strong> the site  displays normally but I can see in the Response Header:</p>
  
  <pre><code>X-Amz-Cf-Id:Ij8TsEU2hPehG53Op6LX1zFDmZfYWBOVFn8el8ApicCQYdYEi69HsQ==
  X-Cache:Miss from cloudfront
  </code></pre>
  
  <p>Here is the current scenario: </p>
  
  <ol>
  <li>Route 53 with <strong>A</strong> alias pointing to CloudFront (for my naked domain and <strong>www</strong>)</li>
  <li>CloudFront with <strong>Origin Domain Name</strong> = load balancer DNS name, also the <strong>cname</strong> are configured to naked domain and www</li>
  <li>Load Balancer with EC2</li>
  <li>EC2 with several sites (I just want use CF in one of them)</li>
  </ol>
  
  <p>Could anyone help me how to configure it correctly? </p>
  
  <p><strong><em>Update 1</em></strong>
  Just a quick observation, the site is in WordPress. But, I don't think that is necessary to use any cdn module (like W3 Total Cache) because I want that the entire site be cached. </p>