<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Replacing Mongrel with Passenger (mod_rails)</title>
	<atom:link href="http://davedupre.com/2009/03/23/replacing-mongrel-with-passenger-mod_rails/feed/" rel="self" type="application/rss+xml" />
	<link>http://davedupre.com/2009/03/23/replacing-mongrel-with-passenger-mod_rails/</link>
	<description>Some random thoughts - Go big or stay home!</description>
	<lastBuildDate>Mon, 23 Jan 2012 18:56:05 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: HOWTO: Ruby on Rails with Apache + Passenger (Mod_Rails) ~ Ubuntu Lucid Lynx 10.04 - Mike&#39;s burogu</title>
		<link>http://davedupre.com/2009/03/23/replacing-mongrel-with-passenger-mod_rails/comment-page-1/#comment-750</link>
		<dc:creator>HOWTO: Ruby on Rails with Apache + Passenger (Mod_Rails) ~ Ubuntu Lucid Lynx 10.04 - Mike&#39;s burogu</dc:creator>
		<pubDate>Sun, 06 Jun 2010 08:59:17 +0000</pubDate>
		<guid isPermaLink="false">http://davedupre.com/?p=260#comment-750</guid>
		<description>[...] Lucid Lynx (2) Phusion Passenger on Ubuntu 9.10 (3) Installing Ruby on Rails on Debian/Ubuntu (4) Replacing Mongrel with Passenger (mod_rails) (5) [...]</description>
		<content:encoded><![CDATA[<p>[...] Lucid Lynx (2) Phusion Passenger on Ubuntu 9.10 (3) Installing Ruby on Rails on Debian/Ubuntu (4) Replacing Mongrel with Passenger (mod_rails) (5) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://davedupre.com/2009/03/23/replacing-mongrel-with-passenger-mod_rails/comment-page-1/#comment-628</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Thu, 11 Jun 2009 11:31:13 +0000</pubDate>
		<guid isPermaLink="false">http://davedupre.com/?p=260#comment-628</guid>
		<description>I don&#039;t understand how javascript and stylesheet tags would have affected where images were loaded from, so I suspect it was the &quot;et cetera&quot; that fixed it.

Good to know about the overlapped host configs. Thanks.</description>
		<content:encoded><![CDATA[<p>I don&#8217;t understand how javascript and stylesheet tags would have affected where images were loaded from, so I suspect it was the &#8220;et cetera&#8221; that fixed it.</p>
<p>Good to know about the overlapped host configs. Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pekka Taipale</title>
		<link>http://davedupre.com/2009/03/23/replacing-mongrel-with-passenger-mod_rails/comment-page-1/#comment-627</link>
		<dc:creator>Pekka Taipale</dc:creator>
		<pubDate>Thu, 11 Jun 2009 09:05:27 +0000</pubDate>
		<guid isPermaLink="false">http://davedupre.com/?p=260#comment-627</guid>
		<description>Uh forgot some tags in there, so what I wrote is not visible. The explicit tags I meant were 
stylesheet_path &quot;css/main.css&quot; 
javascript_include_tag &quot;ui.js&quot; 
et cetera.</description>
		<content:encoded><![CDATA[<p>Uh forgot some tags in there, so what I wrote is not visible. The explicit tags I meant were<br />
stylesheet_path &#8220;css/main.css&#8221;<br />
javascript_include_tag &#8220;ui.js&#8221;<br />
et cetera.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pekka Taipale</title>
		<link>http://davedupre.com/2009/03/23/replacing-mongrel-with-passenger-mod_rails/comment-page-1/#comment-626</link>
		<dc:creator>Pekka Taipale</dc:creator>
		<pubDate>Thu, 11 Jun 2009 09:04:17 +0000</pubDate>
		<guid isPermaLink="false">http://davedupre.com/?p=260#comment-626</guid>
		<description>I got around this by using explicit tags  and  et cetera.

The next problem was that in another host, I couldn&#039;t make Rails run at all, whatever I tried. Checked a million times that Apache has got the module, experimented with load order, tried all sorts of virtual host configurations. Until I found out that in a config file for a completely different virtual host (running in the same server), the file also included a duplicate virtual host definition for the virtual host that i was using! Thus the RailsBaseURI definitions I had added and deleted so many times were all the time ignored.

So, a lesson to be learned: be sure that your virtual host config is clear and there are no overlaps. This overlap was not done by me but another system maintainer, it had been there for a long while - it just hadn&#039;t interfered with anything until this.</description>
		<content:encoded><![CDATA[<p>I got around this by using explicit tags  and  et cetera.</p>
<p>The next problem was that in another host, I couldn&#8217;t make Rails run at all, whatever I tried. Checked a million times that Apache has got the module, experimented with load order, tried all sorts of virtual host configurations. Until I found out that in a config file for a completely different virtual host (running in the same server), the file also included a duplicate virtual host definition for the virtual host that i was using! Thus the RailsBaseURI definitions I had added and deleted so many times were all the time ignored.</p>
<p>So, a lesson to be learned: be sure that your virtual host config is clear and there are no overlaps. This overlap was not done by me but another system maintainer, it had been there for a long while &#8211; it just hadn&#8217;t interfered with anything until this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://davedupre.com/2009/03/23/replacing-mongrel-with-passenger-mod_rails/comment-page-1/#comment-624</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Wed, 10 Jun 2009 00:36:11 +0000</pubDate>
		<guid isPermaLink="false">http://davedupre.com/?p=260#comment-624</guid>
		<description>You are correct, things should have come from your sub URI. Stupid question, I&#039;m sure, but did you restart Apache? I know I&#039;ve made that mistake once or twice (OK, maybe more, but who&#039;s counting).

I did this for http://sermo.com/newsscores and followed the Passenger docs exactly (see http://www.modrails.com/documentation/Users%20guide.html#deploying_rails_to_sub_uri). In my case, only /newsscores was handled by Passenger. The rest was a simple PHP site that existed before.

You can post more of your apache configs. Maybe I can figure something out. Feel free to email me at dave AT [this domain] if you would rather not make things too public.</description>
		<content:encoded><![CDATA[<p>You are correct, things should have come from your sub URI. Stupid question, I&#8217;m sure, but did you restart Apache? I know I&#8217;ve made that mistake once or twice (OK, maybe more, but who&#8217;s counting).</p>
<p>I did this for <a href="http://sermo.com/newsscores" rel="nofollow">http://sermo.com/newsscores</a> and followed the Passenger docs exactly (see <a href="http://www.modrails.com/documentation/Users%20guide.html#deploying_rails_to_sub_uri" rel="nofollow">http://www.modrails.com/documentation/Users%20guide.html#deploying_rails_to_sub_uri</a>). In my case, only /newsscores was handled by Passenger. The rest was a simple PHP site that existed before.</p>
<p>You can post more of your apache configs. Maybe I can figure something out. Feel free to email me at dave AT [this domain] if you would rather not make things too public.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pekka Taipale</title>
		<link>http://davedupre.com/2009/03/23/replacing-mongrel-with-passenger-mod_rails/comment-page-1/#comment-623</link>
		<dc:creator>Pekka Taipale</dc:creator>
		<pubDate>Tue, 09 Jun 2009 22:00:09 +0000</pubDate>
		<guid isPermaLink="false">http://davedupre.com/?p=260#comment-623</guid>
		<description>Thanks for the hint. Passenger looks very nice.

However, there is one configuration quirk that I haven&#039;t figured out yet.

What I do is try to run a Rails application through a sub URI in Apache. It behaves differently from webrick. In other words: when I did run &quot;rorapp&quot; in webrick, I said

$ cd ~/src/rorapp
$ script/server

and pointed my browser to http://localhost:3000 . This works.

Now, with the sub URI, I have Apache document root at /var/www, and I have said ln -s ~/src/rorapp/public /var/www/rorapp. I have configured this directory with directives in Apache configuration, in a virtual host section:

        RailsBaseURI /rorapp
        RailsEnv development

And the application starts to load, but for some reason any files the index.html.erb tries to load are fetched from server root, not from the sub URI directory! The application in Webrick mode fetches background.jpg from /images/background.jpg and this is fine, but in sub URI mode it should be fetched from /rorapp/images/background.jpg. And NO, I do not have absolute path names in my app, I have relative path names. Still, the browser tries to read them with absolute paths (I checked this with Wireshark).

Any clues?</description>
		<content:encoded><![CDATA[<p>Thanks for the hint. Passenger looks very nice.</p>
<p>However, there is one configuration quirk that I haven&#8217;t figured out yet.</p>
<p>What I do is try to run a Rails application through a sub URI in Apache. It behaves differently from webrick. In other words: when I did run &#8220;rorapp&#8221; in webrick, I said</p>
<p>$ cd ~/src/rorapp<br />
$ script/server</p>
<p>and pointed my browser to <a href="http://localhost:3000" rel="nofollow">http://localhost:3000</a> . This works.</p>
<p>Now, with the sub URI, I have Apache document root at /var/www, and I have said ln -s ~/src/rorapp/public /var/www/rorapp. I have configured this directory with directives in Apache configuration, in a virtual host section:</p>
<p>        RailsBaseURI /rorapp<br />
        RailsEnv development</p>
<p>And the application starts to load, but for some reason any files the index.html.erb tries to load are fetched from server root, not from the sub URI directory! The application in Webrick mode fetches background.jpg from /images/background.jpg and this is fine, but in sub URI mode it should be fetched from /rorapp/images/background.jpg. And NO, I do not have absolute path names in my app, I have relative path names. Still, the browser tries to read them with absolute paths (I checked this with Wireshark).</p>
<p>Any clues?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

