<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>lstierneyltd &#187; apache</title>
	<atom:link href="http://lstierneyltd.com/blog/tag/apache/feed/" rel="self" type="application/rss+xml" />
	<link>http://lstierneyltd.com/blog</link>
	<description>Yet another development blog</description>
	<lastBuildDate>Wed, 13 Jul 2011 12:55:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Apache Config for reduced bandwidth usage</title>
		<link>http://lstierneyltd.com/blog/development/apache-config-for-reduced-bandwidth-usage/</link>
		<comments>http://lstierneyltd.com/blog/development/apache-config-for-reduced-bandwidth-usage/#comments</comments>
		<pubDate>Sun, 30 May 2010 12:47:48 +0000</pubDate>
		<dc:creator>lawrence</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[apache]]></category>

		<guid isPermaLink="false">http://lstierneyltd.com/blog/?p=85</guid>
		<description><![CDATA[This snippet of an Apache config (httpd.conf) attempts to implement an intelligent caching policy in order to reduce the amount of files needlessly served. Obviously you would only want to do this once your site has moved into test or production environment. Basic tests using YSlow firefox plugin show bandwidth usage reduced by almost 90%. [...]]]></description>
			<content:encoded><![CDATA[<p>This snippet of an Apache config (httpd.conf) attempts to implement an intelligent caching policy in order to reduce the amount of files needlessly served. Obviously you would only want to do this once your site has moved into test or production environment. Basic tests using <a href="https://addons.mozilla.org/en-US/firefox/addon/5369">YSlow firefox plugin</a> show bandwidth usage reduced by almost 90%.<br />
<code><span id="more-85"></span></code></p>
<pre>
&lt;VirtualHost *:80&gt;
    ServerAdmin info@myhost.co.uk
    DocumentRoot /var/www/mysite/public_html/
    ServerName mysite.myhost.co.uk
    ErrorLog logs/mysite.myhost-error_log
    CustomLog logs/mysite.myhost-access_log common
    &lt;Directory /var/www/mysite/&gt;
      Options All
      AllowOverride All
      Order allow,deny
      Allow from all
    &lt;/Directory&gt;
Header unset ETag
FileETag None

# Turn on Expires and set default to 0
ExpiresActive On
ExpiresDefault A0

# Set up caching on media files for 1 year (forever?)
&lt;FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav)$"&gt;
ExpiresDefault A29030400
Header append Cache-Control "public"
&lt;/FilesMatch&gt;

# Set up caching on media files for 1 week
&lt;FilesMatch "\.(gif|jpg|jpeg|png|swf)$"&gt;
ExpiresDefault A604800
Header append Cache-Control "public"
&lt;/FilesMatch&gt;

# Set up 2 Hour caching on commonly updated files
&lt;FilesMatch "\.(xml|txt|html|js|css)$"&gt;
ExpiresDefault A14515200
Header append Cache-Control "proxy-revalidate"
&lt;/FilesMatch&gt;

# Force no caching for dynamic files
&lt;FilesMatch "\.(php|cgi|pl|htm)$"&gt;
ExpiresActive Off
Header set Cache-Control "private, no-cache, no-store, proxy-revalidate, no-transform"
Header set Pragma "no-cache"
&lt;/FilesMatch&gt;

&lt;Location /&gt;
# Compress output
AddOutputFilterByType DEFLATE text/html text/css text/plain text/xml application/x-javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
&lt;/Location&gt;
&lt;/VirtualHost&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://lstierneyltd.com/blog/development/apache-config-for-reduced-bandwidth-usage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

