<?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>RayRay Is Forever &#187; apache</title>
	<atom:link href="http://blog.rayrayisforever.com/tag/apache/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.rayrayisforever.com</link>
	<description>Boyfriends Are Temporary!</description>
	<lastBuildDate>Mon, 17 May 2010 19:21:05 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Rewrite Drupal RSS XML feeds to Feedburner to get a count</title>
		<link>http://blog.rayrayisforever.com/2009/08/rewrite-drupal-rss-xml-feeds-to-feedburner-to-get-a-count</link>
		<comments>http://blog.rayrayisforever.com/2009/08/rewrite-drupal-rss-xml-feeds-to-feedburner-to-get-a-count#comments</comments>
		<pubDate>Mon, 31 Aug 2009 08:42:47 +0000</pubDate>
		<dc:creator>RayRay</dc:creator>
				<category><![CDATA[Server Blog]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[mod_rewrite]]></category>
		<category><![CDATA[rss]]></category>
		<category><![CDATA[TranceDesign]]></category>

		<guid isPermaLink="false">http://blog.rayrayisforever.com/?p=367</guid>
		<description><![CDATA[TranceDesign.net is a DJ Mix podcast that was the idea of my friend CharlieF and myself. We have been running the podcast for a few years, and although originally I wanted to record my own DJ Mix weekly to add in, life got busier and it was hard to maintain. At first we built the RSS [...]]]></description>
			<content:encoded><![CDATA[<p>TranceDesign.net is a DJ Mix podcast that was the idea of my friend <noindex><a rel="nofollow" href="http://blog.rayrayisforever.com/goto/http://friendfeed.com/charlief"   target="_blank">CharlieF</a></noindex> and <noindex><a rel="nofollow" href="http://blog.rayrayisforever.com/goto/http://friendfeed.com/rayrayisforever"   target="_blank">myself</a></noindex>. We have been running the podcast for a few years, and although originally I wanted to record my own DJ Mix weekly to add in, life got busier and it was hard to maintain. At first we built the RSS XML and HTML files by hand when a new mix was uploaded. This got boring for me, so I put up a Drupal 6 site with the Audio modules and custom views to take care of things automatically. So far it has been pretty nice to be able to upload everything and organize data within Drupal, however I often wondered how many subscribers we had. I could estimate how many after posting a new mix, but after a recent mix the number started to fall. I&#8217;ll get to that later, though.</p>
<p>I decided it was time to redirect the feed to Feedburner so we could use their fun widgets and stats. In order to save CPU, I would often wget the files from Drupal so that Apache just had to serve a static file. This also takes care of that.</p>
<p>There are some important exemptions that need to be taken into consideration. For one, the iTunes store caches data and Feedburner checks every 30 minutes. I wanted the iTunes store to also have the raw XML feed, since Feedburner has a 550K limit on how much of a feed it carries. There are actually two feeds. <noindex><a rel="nofollow" href="http://blog.rayrayisforever.com/goto/http://feeds.feedburner.com/TranceDesign"   target="_blank">One for iTunes</a></noindex> that just has the podcast media enclosure, summary, and details. The second is an <noindex><a rel="nofollow" href="http://blog.rayrayisforever.com/goto/http://feeds.feedburner.com/trancedesign-full"   target="_blank">RSS feed that contains the full tracklistings</a></noindex> as they appear on the site for use in readers. I decided that I also wanted the <noindex><a rel="nofollow" href="http://blog.rayrayisforever.com/goto/http://www.facebook.com/pages/Trance-Design/96706960782" rel="nofollow"   target="_blank">Trance Design Facebook page</a></noindex> take the feed from the server, since it is quite slow to update and this lets me tier the notifications. Facebook also sends the note to <noindex><a rel="nofollow" href="http://blog.rayrayisforever.com/goto/http://twitter.com/trancedesign"   target="_blank">Twitter.com/trancedesign</a></noindex> automatically, so the sooner the better. It is actually quite nice to have a landing page at Feedburner so anyone can see their choice of reader in order to subscribe. For the easy-going, there has always been a <noindex><a rel="nofollow" href="http://blog.rayrayisforever.com/goto/http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=250905540" rel="nofollow"  title="Subscribe to TranceDesign through the iTunes Music Store"  target="_blank">direct link to the iTunes music store</a></noindex> where one may subscribe.</p>
<p>So here are my mod_rewrite rules for the .htaccess file:</p>
<p><pre><code>RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} !FeedBurner/* [OR]
RewriteCond %{HTTP_USER_AGENT} !FeedValidator* [OR]
RewriteCond %{HTTP_USER_AGENT} !iTMS* [OR]
RewriteRule ^trancedesign\.xml$ http://feeds.feedburner.com/TranceDesign [R=302,L]</code></pre></p>
<p><code> </code></p>
<p><pre><code>RewriteCond %{HTTP_USER_AGENT} !FeedValidator* [OR]
RewriteCond %{HTTP_USER_AGENT} !FacebookFeedParser* [OR]
RewriteCond %{HTTP_USER_AGENT} !FeedBurner/*
RewriteRule ^rss\.xml$ http://feeds.feedburner.com/trancedesign-full [R=302,L]</code></pre></p>
<p><code> </code></p>
<p>Finding the user agent for Apple&#8217;s iTunes Music Store required some log grepping, and the user agent iTMS comes from Apple&#8217;s IP block range. That out of the way, I was then able to use FeedBurner&#8217;s <strong>Optimize</strong> tab and enable <strong>BrowserFriendly</strong>&#8217;s <strong>redirection</strong> option. This places the original URL in the list for subscriptions, and lets me use FeedBurner to count how many unique subscribers we have while not permanently redirecting the traffic away from the site. Since FeedBurner is not redirected to itself, it will have the most up to date feed from the site.</p>
<p>Now I get some fun widgets to display on the page:<br />
Regular subscribers: <noindex><a rel="nofollow" href="http://blog.rayrayisforever.com/goto/http://feeds.feedburner.com/TranceDesign"  ><img style="border:0" src="http://feeds.feedburner.com/~fc/TranceDesign?bg=FFFFFF&amp;fg=444444&amp;anim=0&amp;label=listeners" alt=" Rewrite Drupal RSS XML feeds to Feedburner to get a count" width="88" height="26" title="Rewrite Drupal RSS XML feeds to Feedburner to get a count" /></a></noindex><br />
Full Tracklisting subscribers: <noindex><a rel="nofollow" href="http://blog.rayrayisforever.com/goto/http://feeds.feedburner.com/trancedesign-full"  ><img style="border:0" src="http://feeds.feedburner.com/~fc/trancedesign-full?bg=FFFFFF&amp;fg=444444&amp;anim=0&amp;label=listeners" alt=" Rewrite Drupal RSS XML feeds to Feedburner to get a count" width="88" height="26" title="Rewrite Drupal RSS XML feeds to Feedburner to get a count" /></a></noindex></p>
<p>It has only been a day since I made the change, and some issues I&#8217;ve been having with the site on the new host have made the download URLs sometimes return a 404. I&#8217;ve been tracking this down and it seems to have to do with having caching enabled.</p>
<p>I was seeing in my error_log: Premature end of script headers: and <noindex><a rel="nofollow" href="http://blog.rayrayisforever.com/goto/http://www.trancedesign.net/admin/reports/event/27235"  style="color: #993300; font-weight: bold; text-decoration: none;" >internal_error.html</a></noindex> in my database log.</p>
<p>Hopefully this fixes the problem, as it has surely been frustrating when somebody tries to download a file and then unsubscribes. I was fairly certain we had at least 600+ subscribers, but since I&#8217;ve been putting up mixes of different genres, this could also turn some people off from the podcast entirely. Still, it is nice to have a place to post mixes when I find good ones or when I can get around to publishing a mix.</p>
<p><noindex><a rel="nofollow" href="http://blog.rayrayisforever.com/goto/http://feeds.feedburner.com/trancedesign-full"  >Since the site is now hosted with Dreamhost, I found a rule on </a></noindex><noindex><a rel="nofollow" href="http://blog.rayrayisforever.com/goto/http://www.ravisagar.in/blog/enable-dreamhost-stats-drupal-website"   target="_blank">Ravi Sagar&#8217;s</a></noindex> blog that also helps to see the analog statistics they provide that Drupal and other sites that use rewrite rules prohibit you from seeing.</p>
<p><pre><code>RewriteCond %{REQUEST_URI} ^/stats/(.*)$ [OR]
RewriteCond %{REQUEST_URI} ^/failed_auth.html$
RewriteRule ^.*$ - [L]
</code></pre></p>
<p>I got the gist of this idea from a <noindex><a rel="nofollow" href="http://blog.rayrayisforever.com/goto/http://perishablepress.com/press/2008/03/25/redirect-wordpress-feeds-to-feedburner-via-htaccess-redux/"   target="_blank">Perishable Press post</a></noindex>, however since Feedburner&#8217;s user agent is FeedBurner/1.0 adding wildcards to the RewriteCond was necessary to make it work. Otherwise, Feedburner just pulled the feed from itself.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rayrayisforever.com/2009/08/rewrite-drupal-rss-xml-feeds-to-feedburner-to-get-a-count/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Every thumbnail and resize is built!</title>
		<link>http://blog.rayrayisforever.com/2008/05/every-thumbnail-and-resize-is-built</link>
		<comments>http://blog.rayrayisforever.com/2008/05/every-thumbnail-and-resize-is-built#comments</comments>
		<pubDate>Wed, 28 May 2008 09:48:37 +0000</pubDate>
		<dc:creator>RayRay</dc:creator>
				<category><![CDATA[Gallery Features]]></category>
		<category><![CDATA[Server Blog]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[munin]]></category>

		<guid isPermaLink="false">http://www.hardcoredreamer.com/blog/?p=19</guid>
		<description><![CDATA[Success! Every thumbnail, resize, and movie still has been built! It took quite a bit of work and some switching around of certain plugins, but the gallery does not need to generate any images when a picture is requested.

In the meantime, I have munin monitoring the server and I am very pleased with how smoothly [...]]]></description>
			<content:encoded><![CDATA[<p>Success! Every thumbnail, resize, and movie still has been built! It took quite a bit of work and some switching around of certain plugins, but the gallery does not need to generate any images when a picture is requested.</p>
<p><img src="http://www.hardcoredreamer.com/munin/cyborgcow.net/new.cyborgcow.net-apache_processes-day.png" alt="Apache Processes By Day" width="491" height="286" title="Every thumbnail and resize is built!" /></p>
<p>In the meantime, I have <noindex><a rel="nofollow" href="http://blog.rayrayisforever.com/goto/http://www.cyborgcow.net/munin/"   target="_blank">munin monitoring the server</a></noindex> and I am very pleased with how smoothly everything is running. I have given MySQL much more ram than it needs for the sake of performance, and have been watching the free memory to make sure there is enough for http processes. Of course, I was able to free up many processes by using mod_security smartly.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rayrayisforever.com/2008/05/every-thumbnail-and-resize-is-built/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

