Published

19 December 2012
 / 

Category

Deployment
 / 

Tags

##The Problem If you create a CloundFront distribution with a custom origin, and your custom origin is a windows server running IIS7 or greater, you may notice that while requests directly to the origin are served with gzip compression, the same url requested through CloudFront will not be compressed. This is because the default configuration for IIS7 does not allow compression when requests are made via proxies.

##The Solution To fix this, you need to make a change to the applicationHost.config file on your windows server. This is typically located at C:\Windows\System32\Inetsrv\Config\applicationHost.config.

There are few changes that need to be made.

First, locate the existing <serverRuntime/> node in applicationHost.config and change it to read:

<serverRuntime enabled="true" frequentHitThreshold="1" frequentHitTimePeriod="00:00:20" />

Next, locate the <httpCompression> node and add the following attributes:

noCompressionForHttp10="false" noCompressionForProxies="false"

After an IISReset, all requests through CloudFront should now return Gzipped content.

##References A few links that helped me to this conclusion:



blog comments powered by Disqus