<?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>betweenGo &#187; HTTP Server</title>
	<atom:link href="http://betweengo.com/category/apache/http-server/feed/" rel="self" type="application/rss+xml" />
	<link>http://betweengo.com</link>
	<description>We make Ruby on Rails easy.  We make ATG easy.</description>
	<lastBuildDate>Tue, 08 May 2012 19:30:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>mod_rewrite to bypass security</title>
		<link>http://betweengo.com/2009/03/02/mod_rewrite-to-bypass-security/</link>
		<comments>http://betweengo.com/2009/03/02/mod_rewrite-to-bypass-security/#comments</comments>
		<pubDate>Mon, 02 Mar 2009 16:21:40 +0000</pubDate>
		<dc:creator>Frank Kim</dc:creator>
				<category><![CDATA[HTTP Server]]></category>
		<category><![CDATA[Struts]]></category>
		<category><![CDATA[JBoss]]></category>
		<category><![CDATA[tomcat]]></category>

		<guid isPermaLink="false">http://betweengo.com/?p=447</guid>
		<description><![CDATA[Many Apache webserver installations use uriworkermap to configure requests are forwarded to Tomcat/JBoss and which are not.   This provides a certain level of security.  For example: ## APACHE RESOURCES (static files): !/*.gif=myapp !/*.html=myapp ## DISALLOW  (security-related filter): !/*.jsp=myapp !/*.xml=myapp ## TOMCAT RESOURCES: /*.do=myapp However if you dynamically generate your sitemap.xml or any other XML files [...]
Related posts:<ol>
<li><a href='http://betweengo.com/2008/03/31/installing-apache-with-mod_rewrite-and-mod_proxy_balancer/' rel='bookmark' title='Installing Apache 2.2 with mod_rewrite and mod_proxy_balancer'>Installing Apache 2.2 with mod_rewrite and mod_proxy_balancer</a></li>
<li><a href='http://betweengo.com/2008/09/23/browser-security-warnings/' rel='bookmark' title='Browser Security Warnings'>Browser Security Warnings</a></li>
<li><a href='http://betweengo.com/2008/04/01/mod_rails/' rel='bookmark' title='mod_rails'>mod_rails</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Many Apache webserver installations use <a title="The Apache Tomcat Connector - Reference Guide - uriworkermap.properties configuration" href="http://tomcat.apache.org/connectors-doc/reference/uriworkermap.html">uriworkermap</a> to configure requests are forwarded to Tomcat/JBoss and which are not.   This provides a certain level of security.  For example:</p>
<pre>## APACHE RESOURCES (static files):
!/*.gif=myapp
!/*.html=myapp

## DISALLOW  (security-related filter):
!/*.jsp=myapp
!/*.xml=myapp

## TOMCAT RESOURCES:
/*.do=myapp</pre>
<p>However if you <a title="Dynamically generate sitemap.xml" href="http://betweengo.com/2009/03/02/dynamically-generate-sitemapxml/">dynamically generate your sitemap.xml</a> or any other XML files using a servlet then this security will be a problem since the XML request will not make it to Tomcat/JBoss.  This is when mod_rewrite comes to the rescue.</p>
<p>You can set up <a title="Apache module mod_rewrite" href="http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html">mod_rewrite</a> to rewrite the sitemap.xml request to be a sitemap.do request.</p>
<pre>RewriteRule ^/sitemap\.xml$ /sitemap.do [PT,L]</pre>
<p>Then you can <a title="Strust 1 - Welcome - Struts Config in a Nutshell" href="http://struts.apache.org/1.x/#Struts_Config_in_a_Nutshell">set up Struts</a> to forward this request to sitemap.xml.</p>
<pre>&lt;action path="/sitemap" forward="/sitemap.xml"/&gt;</pre>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbetweengo.com%2F2009%2F03%2F02%2Fmod_rewrite-to-bypass-security%2F&amp;title=mod_rewrite%20to%20bypass%20security" id="wpa2a_2"><img src="http://betweengo.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p><p>Related posts:<ol>
<li><a href='http://betweengo.com/2008/03/31/installing-apache-with-mod_rewrite-and-mod_proxy_balancer/' rel='bookmark' title='Installing Apache 2.2 with mod_rewrite and mod_proxy_balancer'>Installing Apache 2.2 with mod_rewrite and mod_proxy_balancer</a></li>
<li><a href='http://betweengo.com/2008/09/23/browser-security-warnings/' rel='bookmark' title='Browser Security Warnings'>Browser Security Warnings</a></li>
<li><a href='http://betweengo.com/2008/04/01/mod_rails/' rel='bookmark' title='mod_rails'>mod_rails</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://betweengo.com/2009/03/02/mod_rewrite-to-bypass-security/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Turning off JSP access</title>
		<link>http://betweengo.com/2008/08/15/turning-off-jsp-access/</link>
		<comments>http://betweengo.com/2008/08/15/turning-off-jsp-access/#comments</comments>
		<pubDate>Fri, 15 Aug 2008 17:51:34 +0000</pubDate>
		<dc:creator>Frank Kim</dc:creator>
				<category><![CDATA[HTTP Server]]></category>
		<category><![CDATA[JBoss]]></category>

		<guid isPermaLink="false">http://betweengo.com/?p=273</guid>
		<description><![CDATA[To turn off JSP access in your JBoss or other favorite application server add this to your web.xml. &#60;!-- Restrict direct access to jsps --&#62; &#60;security-constraint&#62; &#60;web-resource-collection&#62; &#60;web-resource-name&#62;you_cant_touch_this&#60;/web-resource-name&#62; &#60;url-pattern&#62;*.jsp&#60;/url-pattern&#62; &#60;/web-resource-collection&#62; &#60;auth-constraint/&#62; &#60;/security-constraint&#62; To prevent Apache from sending JSP requests to JBoss add the following to your configuration. ## DISALLOW FROM REACHING JBOSS (security-related filter): !/*.jsp=name_of_your_app [...]
Related posts:<ol>
<li><a href='http://betweengo.com/2009/03/02/mod_rewrite-to-bypass-security/' rel='bookmark' title='mod_rewrite to bypass security'>mod_rewrite to bypass security</a></li>
<li><a href='http://betweengo.com/2009/07/14/recurring-illegal-access-errors-in-jboss-when-running-atg/' rel='bookmark' title='Recurring Illegal Access Errors in JBoss when running ATG'>Recurring Illegal Access Errors in JBoss when running ATG</a></li>
<li><a href='http://betweengo.com/2008/08/22/trim-white-space-from-jsp/' rel='bookmark' title='Trim White Space from JSP'>Trim White Space from JSP</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>To turn off JSP access in your JBoss or other favorite application server add this to your web.xml.</p>
<pre>&lt;!-- Restrict direct access to jsps --&gt;
&lt;security-constraint&gt;
  &lt;web-resource-collection&gt;
    &lt;web-resource-name&gt;you_cant_touch_this&lt;/web-resource-name&gt;
    &lt;url-pattern&gt;*.jsp&lt;/url-pattern&gt;
  &lt;/web-resource-collection&gt;
  &lt;auth-constraint/&gt;
&lt;/security-constraint&gt;</pre>
<p>To prevent Apache from sending JSP requests to JBoss add the following to your configuration.</p>
<pre>## DISALLOW FROM REACHING JBOSS (security-related filter):
!/*.jsp=name_of_your_app
!/*.xml=name_of_your_app</pre>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbetweengo.com%2F2008%2F08%2F15%2Fturning-off-jsp-access%2F&amp;title=Turning%20off%20JSP%20access" id="wpa2a_4"><img src="http://betweengo.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p><p>Related posts:<ol>
<li><a href='http://betweengo.com/2009/03/02/mod_rewrite-to-bypass-security/' rel='bookmark' title='mod_rewrite to bypass security'>mod_rewrite to bypass security</a></li>
<li><a href='http://betweengo.com/2009/07/14/recurring-illegal-access-errors-in-jboss-when-running-atg/' rel='bookmark' title='Recurring Illegal Access Errors in JBoss when running ATG'>Recurring Illegal Access Errors in JBoss when running ATG</a></li>
<li><a href='http://betweengo.com/2008/08/22/trim-white-space-from-jsp/' rel='bookmark' title='Trim White Space from JSP'>Trim White Space from JSP</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://betweengo.com/2008/08/15/turning-off-jsp-access/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stats on Dreamhost with WordPress</title>
		<link>http://betweengo.com/2008/06/03/stats-on-dreamhost-with-wordpress/</link>
		<comments>http://betweengo.com/2008/06/03/stats-on-dreamhost-with-wordpress/#comments</comments>
		<pubDate>Tue, 03 Jun 2008 16:42:57 +0000</pubDate>
		<dc:creator>Frank Kim</dc:creator>
				<category><![CDATA[HTTP Server]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[dreamhost]]></category>

		<guid isPermaLink="false">http://betweengo.com/?p=189</guid>
		<description><![CDATA[On my WordPress blogs hosted by Dreamhost to get stats I needed to add this to the .htaccess file. # BEGIN Stats &#60;IfModule mod_rewrite.c&#62; RewriteEngine On RewriteBase / RewriteCond %{REQUEST_URI} ^/(stats&#124;failed_auth\.html).*$ [NC] RewriteRule . - [L] &#60;/IfModule&#62; # END Stats This is further explained in the Dreamhost Wiki page Making stats accessible with htaccess. Dreamhost [...]
Related posts:<ol>
<li><a href='http://betweengo.com/2006/03/17/wordpress-contact-e-mail-form/' rel='bookmark' title='WordPress Contact E-Mail Form'>WordPress Contact E-Mail Form</a></li>
<li><a href='http://betweengo.com/2005/10/17/wordpress-and-gallery2/' rel='bookmark' title='WordPress and Gallery2'>WordPress and Gallery2</a></li>
<li><a href='http://betweengo.com/2005/10/24/subversion-on-dreamhost/' rel='bookmark' title='Subversion on Dreamhost'>Subversion on Dreamhost</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a title="Analog: WWW logfile analysis" href="http://www.analog.cx/"><img class="alignleft" style="border: 0pt none; float: left; margin-left: 15px; margin-right: 15px;" src="http://www.analog.cx/analogo.gif" alt="Analog: WWW logfile analysis" /></a>On my WordPress blogs hosted by Dreamhost to get stats I needed to add this to the .htaccess file.</p>
<pre># BEGIN Stats
&lt;IfModule mod_rewrite.c&gt;
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^/(stats|failed_auth\.html).*$ [NC]
RewriteRule . - [L]
&lt;/IfModule&gt;
# END Stats</pre>
<p>This is further explained in the Dreamhost Wiki page <a title="Making stats accessible with htaccess" href="http://wiki.dreamhost.com/Making_stats_accessible_with_htaccess">Making stats accessible with htaccess</a>.</p>
<p>Dreamhost uses <a title="Analog: WWW logfile analysis" href="http://www.analog.cx/">Analog</a> to generate web statistics.  Other recommended <a title="AWStats - Free log file analyzer for advanced statistics (GNU GPL)." href="http://awstats.sourceforge.net/">AWStats</a> which seems more powerful.  Maybe I&#8217;ll switch if I feel the need.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbetweengo.com%2F2008%2F06%2F03%2Fstats-on-dreamhost-with-wordpress%2F&amp;title=Stats%20on%20Dreamhost%20with%20WordPress" id="wpa2a_6"><img src="http://betweengo.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p><p>Related posts:<ol>
<li><a href='http://betweengo.com/2006/03/17/wordpress-contact-e-mail-form/' rel='bookmark' title='WordPress Contact E-Mail Form'>WordPress Contact E-Mail Form</a></li>
<li><a href='http://betweengo.com/2005/10/17/wordpress-and-gallery2/' rel='bookmark' title='WordPress and Gallery2'>WordPress and Gallery2</a></li>
<li><a href='http://betweengo.com/2005/10/24/subversion-on-dreamhost/' rel='bookmark' title='Subversion on Dreamhost'>Subversion on Dreamhost</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://betweengo.com/2008/06/03/stats-on-dreamhost-with-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache not starting because of Skype</title>
		<link>http://betweengo.com/2008/05/06/apache-not-starting-because-of-skype/</link>
		<comments>http://betweengo.com/2008/05/06/apache-not-starting-because-of-skype/#comments</comments>
		<pubDate>Wed, 07 May 2008 02:48:29 +0000</pubDate>
		<dc:creator>Frank Kim</dc:creator>
				<category><![CDATA[HTTP Server]]></category>

		<guid isPermaLink="false">http://betweengo.com/?p=179</guid>
		<description><![CDATA[When I started Apache I saw these errors. $ (OS 10048)Only one usage of each socket address (protocol/network address/port) is normally permitted. : make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down Unable to open logs This was puzzling to me since Apache was starting fine before. Fortunately on this forum [...]
Related posts:<ol>
<li><a href='http://betweengo.com/2008/04/18/oracle-tns-listener-service-not-starting/' rel='bookmark' title='Oracle TNS Listener service not starting'>Oracle TNS Listener service not starting</a></li>
<li><a href='http://betweengo.com/2008/03/31/installing-apache-with-mod_rewrite-and-mod_proxy_balancer/' rel='bookmark' title='Installing Apache 2.2 with mod_rewrite and mod_proxy_balancer'>Installing Apache 2.2 with mod_rewrite and mod_proxy_balancer</a></li>
<li><a href='http://betweengo.com/2008/03/28/configuring-capistrano-and-mongrel/' rel='bookmark' title='Configuring Capistrano and Mongrel'>Configuring Capistrano and Mongrel</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>When I started Apache I saw these errors.</p>
<pre>$ (OS 10048)Only one usage of each socket address (protocol/network address/port) is normally permitted.  : make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs</pre>
<p>This was puzzling to me since Apache was starting fine before.  Fortunately on this forum thread,  <a title="Failure Message starting Apache - ProgrammingTalk" href="http://www.programmingtalk.com/showthread.php?t=6681">Failure Message starting Apache</a>, one of the respondents had diagnosed the problem.</p>
<blockquote><p>I&#8217;ve had the same problem. I noticed that when I reboot my computer (running XP pro), sometimes Apache worked. Then, I change the port to 3128 and it worked. But, then I was illuminated by God, and do a netstat -ao (-o displays the PID) and discover that Skype was listening in port 80 instead of apache -that is, I have both set up to run at startup, thus, if apache started first, it will have port 80 available, and Skype not, and vice-versa-. So my solution was to remove Skype from startup -I don&#8217;t use it too often- and make apache (and myself) happy by making port 80 available.</p></blockquote>
<p>All I had to do was stop Skype and everything was fine.  Too bad <a title="TcpView" href="http://betweengo.com/windows/2008/04/18/tcpview/">TcpView</a> was not able to tell me that Skype was using port 80.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbetweengo.com%2F2008%2F05%2F06%2Fapache-not-starting-because-of-skype%2F&amp;title=Apache%20not%20starting%20because%20of%20Skype" id="wpa2a_8"><img src="http://betweengo.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p><p>Related posts:<ol>
<li><a href='http://betweengo.com/2008/04/18/oracle-tns-listener-service-not-starting/' rel='bookmark' title='Oracle TNS Listener service not starting'>Oracle TNS Listener service not starting</a></li>
<li><a href='http://betweengo.com/2008/03/31/installing-apache-with-mod_rewrite-and-mod_proxy_balancer/' rel='bookmark' title='Installing Apache 2.2 with mod_rewrite and mod_proxy_balancer'>Installing Apache 2.2 with mod_rewrite and mod_proxy_balancer</a></li>
<li><a href='http://betweengo.com/2008/03/28/configuring-capistrano-and-mongrel/' rel='bookmark' title='Configuring Capistrano and Mongrel'>Configuring Capistrano and Mongrel</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://betweengo.com/2008/05/06/apache-not-starting-because-of-skype/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mod_rails</title>
		<link>http://betweengo.com/2008/04/01/mod_rails/</link>
		<comments>http://betweengo.com/2008/04/01/mod_rails/#comments</comments>
		<pubDate>Wed, 02 Apr 2008 04:02:08 +0000</pubDate>
		<dc:creator>Frank Kim</dc:creator>
				<category><![CDATA[HTTP Server]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://betweengo.com/?p=166</guid>
		<description><![CDATA[Previously I talked about configuring a production Ruby on Rails applications using a Mongrel cluster with an Apache front end / load balancer. Now though a new Apache module was released called mod_rails which obviates the need for a Mongrel cluster. Seems promising, both for simplicity of installation and performance. Related posts: Installing Apache 2.2 [...]
Related posts:<ol>
<li><a href='http://betweengo.com/2008/03/31/installing-apache-with-mod_rewrite-and-mod_proxy_balancer/' rel='bookmark' title='Installing Apache 2.2 with mod_rewrite and mod_proxy_balancer'>Installing Apache 2.2 with mod_rewrite and mod_proxy_balancer</a></li>
<li><a href='http://betweengo.com/2008/03/31/configuring-apache-to-work-with-a-mongrel-cluster/' rel='bookmark' title='Configuring Apache to work with a Mongrel Cluster'>Configuring Apache to work with a Mongrel Cluster</a></li>
<li><a href='http://betweengo.com/2008/03/28/configuring-capistrano-and-mongrel/' rel='bookmark' title='Configuring Capistrano and Mongrel'>Configuring Capistrano and Mongrel</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Previously I talked about <a title="Installing Apache 2.2 with mod_rewrite and mod_proxy_balancer" href="http://betweengo.com/ruby-on-rails/2008/03/31/installing-apache-with-mod_rewrite-and-mod_proxy_balancer/">configuring a production Ruby on Rails applications using a Mongrel cluster with an Apache front end / load balancer</a>.  Now though a new Apache module was released called <a title="Phusion Passenger (a.k.a. mod_rails for Apache)" href="http://www.modrails.com/">mod_rails</a> which obviates the need for a Mongrel cluster.  Seems promising, both for simplicity of installation and performance.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbetweengo.com%2F2008%2F04%2F01%2Fmod_rails%2F&amp;title=mod_rails" id="wpa2a_10"><img src="http://betweengo.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p><p>Related posts:<ol>
<li><a href='http://betweengo.com/2008/03/31/installing-apache-with-mod_rewrite-and-mod_proxy_balancer/' rel='bookmark' title='Installing Apache 2.2 with mod_rewrite and mod_proxy_balancer'>Installing Apache 2.2 with mod_rewrite and mod_proxy_balancer</a></li>
<li><a href='http://betweengo.com/2008/03/31/configuring-apache-to-work-with-a-mongrel-cluster/' rel='bookmark' title='Configuring Apache to work with a Mongrel Cluster'>Configuring Apache to work with a Mongrel Cluster</a></li>
<li><a href='http://betweengo.com/2008/03/28/configuring-capistrano-and-mongrel/' rel='bookmark' title='Configuring Capistrano and Mongrel'>Configuring Capistrano and Mongrel</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://betweengo.com/2008/04/01/mod_rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Apache 2.2 with mod_rewrite and mod_proxy_balancer</title>
		<link>http://betweengo.com/2008/03/31/installing-apache-with-mod_rewrite-and-mod_proxy_balancer/</link>
		<comments>http://betweengo.com/2008/03/31/installing-apache-with-mod_rewrite-and-mod_proxy_balancer/#comments</comments>
		<pubDate>Tue, 01 Apr 2008 05:18:29 +0000</pubDate>
		<dc:creator>Frank Kim</dc:creator>
				<category><![CDATA[HTTP Server]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://betweengo.com/?p=165</guid>
		<description><![CDATA[As mentioned in my post, Configuring Apache to work with a Mongrel Cluster, you need an Apache installation with mod_rewrite and mod_proxy_balancer. Unfortunately on the Red Hat installation I was using the default installation is Apache 2.0 which does not have mod_proxy_balancer. When I tried to upgrade it using up2date I got some errors that [...]
Related posts:<ol>
<li><a href='http://betweengo.com/2008/03/31/configuring-apache-to-work-with-a-mongrel-cluster/' rel='bookmark' title='Configuring Apache to work with a Mongrel Cluster'>Configuring Apache to work with a Mongrel Cluster</a></li>
<li><a href='http://betweengo.com/2008/03/28/installing-ruby-on-rails-on-red-hat-enterprise-linux-4/' rel='bookmark' title='Installing Ruby on Rails on Red Hat Enterprise Linux 4'>Installing Ruby on Rails on Red Hat Enterprise Linux 4</a></li>
<li><a href='http://betweengo.com/2009/03/02/mod_rewrite-to-bypass-security/' rel='bookmark' title='mod_rewrite to bypass security'>mod_rewrite to bypass security</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>As mentioned in my post, <a title="Configuring Apache to work with a Mongrel Cluster" href="http://betweengo.com/ruby-on-rails/2008/03/31/configuring-apache-to-work-with-a-mongrel-cluster/">Configuring Apache to work with a Mongrel Cluster</a>, you need an Apache installation with mod_rewrite and mod_proxy_balancer.  Unfortunately on the Red Hat installation I was using the default installation is Apache 2.0 which does not have mod_proxy_balancer.  When I tried to upgrade it using up2date I got some <a title="Why do I get " href="http://kbase.redhat.com/faq/FAQ_61_5418.shtm">errors that seemed to indicate this install was not properly registered</a>.  I then tried using the Apache 2.2 install done by the tech guy but this install did not have the modules I needed.</p>
<p>Therefore it was time for me to do the install by myself.  Fortunately it was not hard with the help of this article, <a title="Building Apache 2.2 from source for Ubuntu Dapper" href="http://davidwinter.me.uk/articles/2006/10/17/building-apache-22-from-source-for-ubuntu-dapper/">Building Apache 2.2</a> plus the <a title="Compiling and Installing Apache 2.2" href="http://httpd.apache.org/docs/2.2/install.html">manual</a>.</p>
<p>Here is what I did.</p>
<pre>$ wget http://apache.mirror99.com/httpd/httpd-2.2.8.tar.gz
$ tar xvfz httpd-2.2.8.tar.gz
$ cd httpd-2.2.8
$ ./configure --enable-rewrite=shared --enable-proxy=shared \
    --enable-proxy_balancer=shared --enable-proxy_http=shared
$ make
$ sudo make install
$ sudo /usr/local/apache2/bin/apachectl start</pre>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbetweengo.com%2F2008%2F03%2F31%2Finstalling-apache-with-mod_rewrite-and-mod_proxy_balancer%2F&amp;title=Installing%20Apache%202.2%20with%20mod_rewrite%20and%20mod_proxy_balancer" id="wpa2a_12"><img src="http://betweengo.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p><p>Related posts:<ol>
<li><a href='http://betweengo.com/2008/03/31/configuring-apache-to-work-with-a-mongrel-cluster/' rel='bookmark' title='Configuring Apache to work with a Mongrel Cluster'>Configuring Apache to work with a Mongrel Cluster</a></li>
<li><a href='http://betweengo.com/2008/03/28/installing-ruby-on-rails-on-red-hat-enterprise-linux-4/' rel='bookmark' title='Installing Ruby on Rails on Red Hat Enterprise Linux 4'>Installing Ruby on Rails on Red Hat Enterprise Linux 4</a></li>
<li><a href='http://betweengo.com/2009/03/02/mod_rewrite-to-bypass-security/' rel='bookmark' title='mod_rewrite to bypass security'>mod_rewrite to bypass security</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://betweengo.com/2008/03/31/installing-apache-with-mod_rewrite-and-mod_proxy_balancer/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Configuring Apache to work with a Mongrel Cluster</title>
		<link>http://betweengo.com/2008/03/31/configuring-apache-to-work-with-a-mongrel-cluster/</link>
		<comments>http://betweengo.com/2008/03/31/configuring-apache-to-work-with-a-mongrel-cluster/#comments</comments>
		<pubDate>Tue, 01 Apr 2008 00:38:08 +0000</pubDate>
		<dc:creator>Frank Kim</dc:creator>
				<category><![CDATA[HTTP Server]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://betweengo.com/?p=164</guid>
		<description><![CDATA[Previously I wrote about Configuring Capistrano and Mongrel. Now we are going to configure Apache to work with the Mongrel cluster. For this article I used the chapter Setting Up A Development Environment in Agile Web Development with Rails, version 2.0, plus this article. Time For A Grown-Up Server: Rails, Mongrel, Apache, Capistrano and You [...]
Related posts:<ol>
<li><a href='http://betweengo.com/2008/03/31/installing-apache-with-mod_rewrite-and-mod_proxy_balancer/' rel='bookmark' title='Installing Apache 2.2 with mod_rewrite and mod_proxy_balancer'>Installing Apache 2.2 with mod_rewrite and mod_proxy_balancer</a></li>
<li><a href='http://betweengo.com/2008/03/28/configuring-capistrano-and-mongrel/' rel='bookmark' title='Configuring Capistrano and Mongrel'>Configuring Capistrano and Mongrel</a></li>
<li><a href='http://betweengo.com/2008/05/27/monit/' rel='bookmark' title='Monit and Mongrel'>Monit and Mongrel</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Previously I wrote about <a title="Configuring Capistrano and Mongrel" href="http://betweengo.com/ruby-on-rails/2008/03/28/configuring-capistrano-and-mongrel/">Configuring Capistrano and Mongrel</a>.  Now we are going to configure Apache to work with the Mongrel cluster.</p>
<p>For this article I used the chapter Setting Up A Development Environment in Agile Web Development with Rails, version 2.0, plus this article.</p>
<ul>
<li><a title="Configuring Capistrano and Mongrel" href="http://betweengo.com/ruby-on-rails/2008/03/28/configuring-capistrano-and-mongrel/"> </a><a title="Time For A Grown-Up Server: Rails, Mongrel, Apache, Capistrano and You" rel="bookmark" href="http://blog.codahale.com/2006/06/19/time-for-a-grown-up-server-rails-mongrel-apache-capistrano-and-you/">Time For A Grown-Up Server: Rails, Mongrel, Apache, Capistrano and You</a></li>
</ul>
<p>Capistrano working together with Mongrel allows you to deploy and restart Mongrel clusters quite nicely.</p>
<p><strong>Configure Apache proxy balancer</strong></p>
<p>Apache has a mod_proxy_balancer module which must be enabled.  Once this is done you can add the following to the end of <code>conf/httpd.conf</code> or if you are on Red Hat Linux you can put the proxy balancing section in <code>/etc/httpd/conf.d/myapp.proxy_cluster.conf</code> and the virtual host section in <code>/etc/httpd/conf.d/myapp.conf</code>.</p>
<pre>&lt;Proxy balancer://mongrel_cluster&gt;
  BalancerMember http://127.0.0.1:8000
  BalancerMember http://127.0.0.1:8001
  BalancerMember http://127.0.0.1:8002
&lt;/Proxy&gt;

&lt;VirtualHost *:80&gt;
  Include conf/myapp.common (or Include conf.d/myapp.common)
  ErrorLog logs/myapp_errors_log
  CustomLog logs/myapp_log combined
&lt;/VirtualHost&gt;</pre>
<p><strong>Configure Apache Virtual Host</strong></p>
<p>Next you configure the virtual host that represents the Ruby on Rails application in the custom file <code>conf/myapp.common</code> or if you are on Red Hat Linux in <code>/etc/httpd/conf.d/myapp.common</code>.</p>
<pre>ServerName myapp.com
DocumentRoot /usr/local/rails/myapp/current/public

&lt;Directory "/usr/local/rails/myapp/current/public"&gt;
  Options FollowSymLinks
  AllowOverride None
  Order allow,deny
  Allow from all
&lt;/Directory&gt;

RewriteEngine On

# Uncomment for rewrite debugging
#RewriteLog logs/myapp_rewrite_log
#RewriteLogLevel 9 

# Check for maintenance file and redirect all requests
RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
RewriteCond %{SCRIPT_FILENAME} !maintenance.html
RewriteRule ^.*$ /system/maintenance.html [L]

# Rewrite index to check for static
RewriteRule ^/$ /index.html [QSA] 

# Rewrite to check for Rails cached page
RewriteRule ^([^.]+)$ $1.html [QSA]

# Redirect all non-static requests to cluster
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule ^/(.*)$ balancer://mongrel_cluster%{REQUEST_URI} [P,QSA,L]</pre>
<p><strong>Restart Apache</strong></p>
<pre>$ sudo /usr/local/apache2/bin/httpd -k restart</pre>
<p>or</p>
<pre>$ sudo /etc/init.d/httpd restart</pre>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fbetweengo.com%2F2008%2F03%2F31%2Fconfiguring-apache-to-work-with-a-mongrel-cluster%2F&amp;title=Configuring%20Apache%20to%20work%20with%20a%20Mongrel%20Cluster" id="wpa2a_14"><img src="http://betweengo.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p><p>Related posts:<ol>
<li><a href='http://betweengo.com/2008/03/31/installing-apache-with-mod_rewrite-and-mod_proxy_balancer/' rel='bookmark' title='Installing Apache 2.2 with mod_rewrite and mod_proxy_balancer'>Installing Apache 2.2 with mod_rewrite and mod_proxy_balancer</a></li>
<li><a href='http://betweengo.com/2008/03/28/configuring-capistrano-and-mongrel/' rel='bookmark' title='Configuring Capistrano and Mongrel'>Configuring Capistrano and Mongrel</a></li>
<li><a href='http://betweengo.com/2008/05/27/monit/' rel='bookmark' title='Monit and Mongrel'>Monit and Mongrel</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://betweengo.com/2008/03/31/configuring-apache-to-work-with-a-mongrel-cluster/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
