<?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>I swore I wouldn&#039;t &#187; ec2</title>
	<atom:link href="http://www.wontblog.com/tag/ec2/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.wontblog.com</link>
	<description>Oh no, I&#039;m blogging now?</description>
	<lastBuildDate>Wed, 23 Feb 2011 20:06:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>HTML pages returned as plaintext, who is the culprit?</title>
		<link>http://www.wontblog.com/2010/07/15/html-pages-returned-as-plaintext-who-is-the-culprit/</link>
		<comments>http://www.wontblog.com/2010/07/15/html-pages-returned-as-plaintext-who-is-the-culprit/#comments</comments>
		<pubDate>Thu, 15 Jul 2010 14:21:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Infrastructure]]></category>
		<category><![CDATA[ec2]]></category>

		<guid isPermaLink="false">http://www.wontblog.com/?p=61</guid>
		<description><![CDATA[I have been moving applications from my Rackspace host over to Amazon&#8217;s EC2 service.  Moving simple LAMP apps has been fairly cut and dry, but while moving a RoR app and accessing it through apache w/ mod_proxy, the html is delivered to the browser as plaintext.  If I access the app directly on mongrel&#8217;s port, [...]]]></description>
			<content:encoded><![CDATA[<p><!--digg--><br />
<img class="alignnone" title="HTML served as plaintext" src="http://img.skitch.com/20100715-fi6q77pca8nms2r7xdm43b9nt.png" alt="" width="398" height="323" /></p>
<p>I have been moving applications from my Rackspace host over to Amazon&#8217;s EC2 service.  Moving simple LAMP apps has been fairly cut and dry, but while moving a RoR app and accessing it through apache w/ mod_proxy, the html is delivered to the browser as plaintext.  If I access the app directly on mongrel&#8217;s port, it renders correctly.   So it appears that something with either my mod_proxy configuration, or something about how my EC2 instance is set up is causing the problem.</p>
<p><code><br />
&gt; curl -I http://linux.local:3000<br />
HTTP/1.1 200 OK<br />
Connection: close<br />
Date: Thu, 15 Jul 2010 14:27:27 GMT<br />
Content-Length: 0</p>
<p>&gt; curl -I http://linux.local<br />
HTTP/1.1 200 OK<br />
Date: Thu, 15 Jul 2010 14:27:35 GMT<br />
Via: 1.1 linux.local<br />
Content-Type: text/plain<br />
</code></p>
<p>As you can see, when accessing the page through Apache/mod_proxy, the Content-Type that is returned is explicitly set as text/plain.</p>
<p><strong>Update</strong><br />
This is a bit shoe-horned, but it works for right now.  In the apache2.conf file, I changed the DefaultType from text/plain to text/html.  The reason this solution &#8220;concerns&#8221; me is that on my other servers, (where this problem is not occurring) the DefaultType is also set to text/plain, but the html is output correctly.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wontblog.com/2010/07/15/html-pages-returned-as-plaintext-who-is-the-culprit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

