<?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>Ruby, Rails, OSX and Linux fun &#187; apache2</title>
	<atom:link href="http://www.frederico-araujo.com/tag/apache2/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.frederico-araujo.com</link>
	<description>Ruby, Rails, OSX and linux sysadmin</description>
	<lastBuildDate>Thu, 02 Sep 2010 08:13:24 +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>Easy installing Passenger mod_rails on gentoo Linux</title>
		<link>http://www.frederico-araujo.com/2008/08/06/easy-installing-passenger-mod_rails-on-gentoo/</link>
		<comments>http://www.frederico-araujo.com/2008/08/06/easy-installing-passenger-mod_rails-on-gentoo/#comments</comments>
		<pubDate>Wed, 06 Aug 2008 05:15:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[gentoo]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[apache2]]></category>
		<category><![CDATA[mod_rails]]></category>

		<guid isPermaLink="false">http://www.frederico-araujo.com/?p=35</guid>
		<description><![CDATA[To install the great Mod_Rails on Gentoo linux it&#8217;s as easy as 5 steps.
Since you are Gentoo user, i don&#8217;t need to go to details. You know what you doing.  
Update: Mod-rails now works with apache mpm-worker
1. Recompile Apache non-threaded
add this to /etc/portage/package.use
www-servers/apache -threads
and this to /etc/make.conf
APACHE2_MPMS="prefork"
2. Re emerge apache
# emerge -va apache
3. Passenger [...]]]></description>
			<content:encoded><![CDATA[<p>To install the great Mod_Rails on Gentoo linux it&#8217;s as easy as 5 steps.</p>
<p>Since you are Gentoo user, i don&#8217;t need to go to details. You know what you doing. <img src='http://www.frederico-araujo.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><strong><em>Update</em></strong>: Mod-rails now works with apache mpm-worker</p>
<h4><span style="text-decoration: line-through;">1. Recompile Apache non-threaded</span></h4>
<p><span style="text-decoration: line-through;">add this to /etc/portage/package.use</span></p>
<pre><span style="text-decoration: line-through;">www-servers/apache -threads</span></pre>
<p><span style="text-decoration: line-through;">and this to /etc/make.conf</span></p>
<pre><span style="text-decoration: line-through;">APACHE2_MPMS="prefork"</span></pre>
<h4><span style="text-decoration: line-through;">2. Re emerge apache</span></h4>
<pre><span style="text-decoration: line-through;"># emerge -va apache</span></pre>
<h4>3. Passenger is in gentoo portage, but its in testing. Currently Version 2.0.1</h4>
<pre># echo "www-apache/passenger" &gt;&gt; /etc/portage/package.keywords</pre>
<h4>4. Install Passenger</h4>
<pre># emerge -va passenger</pre>
<p>If it tries to install rails 2.2.2, rake, and lots of other gems that you already have installed trough rubygems, then run emerge with &#8211;nodeps option</p>
<pre># emerge -va --nodeps passenger</pre>
<h4>5. Edit /etc/conf.d/apache and add &#8220;-D PASSENGER&#8221; to apache options</h4>
<p>for example mine looks like this:</p>
<pre>APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D LANGUAGE -D PROXY -D PASSENGER"</pre>
<p>That&#8217;s it.</p>
<p>Now just drop a similar vhost config file inside /etc/apache/vhosts.d/</p>
<p>This is a sample vhost file for a rails app.</p>
<pre>&lt;VirtualHost *:80&gt;
  ServerName mydomain.com
  DocumentRoot /myapp/public
  Include /etc/apache2/vhosts.d/deflate.conf
  RailsBaseURI /
  # The maximum number of Ruby on Rails application instances that may be simultaneously active.
  # A larger number results in higher memory usage, but improved ability to handle concurrent HTTP clients.
  # normally 1 to 10. (1 for each 50mb ram)
  RailsMaxPoolSize 1
  # The maximum number of seconds that a Ruby on Rails application instance may be idle.
  # That is, if an application instance hasn't done anything after the given number of seconds,
  # then it will be shutdown in order to conserve memory. ( 1 hour)
  RailsPoolIdleTime 3600
  RailsEnv 'production'
  &lt;Directory /myapp/public&gt;
    Options FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
    &lt;/Directory&gt;
&lt;/VirtualHost&gt;</pre>
<p>My sample deflate.conf,<br />
used to gzip the content</p>
<pre>&lt;Location /&gt;
	SetOutputFilter DEFLATE
	#
	# Netscape 4.x has some problems...
	BrowserMatch ^Mozilla/4 gzip-only-text/html
	#
	# Netscape 4.06-4.08 have some more problems
	BrowserMatch ^Mozilla/4\.0[678] no-gzip
	#
	# MSIE masquerades as Netscape, but it is fine
	BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
	# NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
	# the above regex won't work. You can use the following
	# workaround to get the desired effect:
	BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
	# Don't compress images
	SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
	SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
	SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary
	# Make sure proxies don't deliver the wrong content
	Header append Vary User-Agent env=!dont-vary
&lt;/Location&gt;

DeflateFilterNote Input instream
DeflateFilterNote Output outstream
DeflateFilterNote Ratio ratio
LogFormat '"%r" %{output_info}n/%{input_info}n (%{ratio_info}n%%)' deflate
CustomLog /var/log/apache2/deflate_log deflate</pre>
<p>* Update on July 10, 2008.</p>
<p>- Now using gentoo portage to install it. it&#8217;s more smooth.</p>
<p>Note:</p>
<p>Personally I found that Thin + nginx uses less memory(Nginx 4MB + each thin server) than<br />
apache + passenger, which uses quite more. (Apache: 50MB + each rails spawner)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.frederico-araujo.com/2008/08/06/easy-installing-passenger-mod_rails-on-gentoo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
