<?xml version="1.0"?>
<rss version="2.0">
<channel>
  <title>Weiqi Gao&#039;s Observations - tomcat tag</title>
  <link>http://www.weiqigao.com/blog/tags/tomcat/</link>
  <description>Sharing My Experience...</description>
  <language>en</language>
  <copyright>Weiqi Gao</copyright>
  <lastBuildDate>Fri, 11 May 2012 12:48:36 GMT</lastBuildDate>
  <generator>Pebble (http://pebble.sourceforge.net)</generator>
  <docs>http://backend.userland.com/rss</docs>
  
  <image>
    <url>http://pebble.sourceforge.net/common/images/powered-by-pebble.gif</url>
    <title>Weiqi Gao&#039;s Observations</title>
    <link>http://www.weiqigao.com/blog/</link>
  </image>
  
  
  <item>
    <title>Tomcat 6.0.18, Apache 2.2.9, proxy_ajp on Ubuntu 8.10: Almost Trivial...</title>
    <link>http://www.weiqigao.com/blog/2008/12/23/tomcat_6_0_18_apache_2_2_9_proxy_ajp_on_ubuntu_8_10_almost_trivial.html</link>
    
      
        <description>
          &lt;p&gt;... after four hours of documentation re-reading.&lt;/p&gt;

&lt;p&gt;[&lt;b&gt;Update&lt;/b&gt; Tue Dec 23 15:30:20 CST 2008]  The above line was written two days ago when I moved this blog away from a dying PC.  Regular readers might have noticed outages of this blog for stretches of several hours at a time and during the evening hours.  The whole machine would lock up while the disk light is a solid on, presumably trying to read something off the disk.&lt;/p&gt;

&lt;p&gt;This is the second time a PC has died at home.  If you remember, &lt;a href= &#034;http://www.weiqigao.com/blog/2008/11/30/ubuntu_8_10_pure_frustration.html&#034; &gt;gao-2002 went out of commission&lt;/a&gt; only 23 days ago.  And now gao-2006 is gone.  You&#039;ve seen gao-2006 mentioned &lt;a href= &#034;http://www.weiqigao.com/blog/2005/12/12/ubuntu_5_10_first_impression.html&#034; &gt;here&lt;/a&gt;, &lt;a href= &#034;http://www.weiqigao.com/blog/2006/12/12/getting_files_around_secure_copy_scp.html&#034; &gt;here&lt;/a&gt;, &lt;a href= &#034;http://www.weiqigao.com/blog/2005/12/18/printers_that_just_worked_and_other_stories.html&#034; &gt;here&lt;/a&gt;, and &lt;a href= &#034;http://www.weiqigao.com/blog/2008/08/07/upgraded_weblog_software_to_pebble_2_3_1.html&#034; &gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Luckily, I was able to save all the data from the dying PC before it finally would get a kernel panic during the boot up process.  I felt that I was this close to writing a different blog entry that begins: &#034;I&#039;m an idiot and I lost all data in this blog...&#034;&lt;/p&gt;

&lt;hr align=&#034;center&#034; width=&#034;60%&#034; size=&#034;1&#034; noshade=&#034;noshade&#034;&gt;

&lt;p style=&#034;font-size: large; color: red&#034;&gt;Are your data backed up?  Now would be a good time to implement your backup strategy.&lt;/p&gt;

&lt;hr align=&#034;center&#034; width=&#034;60%&#034; size=&#034;1&#034; noshade=&#034;noshade&#034;&gt;

&lt;p&gt;With the backed up data, I was able to setup this blog on gao-2009 within four hours, most of it spent on one task.  Here&#039;s entire process on this Ubuntu 8.10 machine:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Install sun-java6-jdk from Synaptic Package Manager&lt;/li&gt;
&lt;li&gt;Install apache2 from Synaptic Package Manager&lt;/li&gt;
&lt;li&gt;Install tomcat6 from Synaptic Package Manager&lt;/li&gt;
&lt;li&gt;Deploy my blog at &lt;tt&gt;/var/lib/tomcat6/webapp/blog&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;Connecting apache2 to tomcat6&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The first four steps are trivial.  I did the first three prior to the move.  Step 4 took minutes.  Step 5 is also trivial, but I didn&#039;t know it when I started.  What tripped me up is Google.  Most of the search results leads to outdated information.  And I spent a number of hours following the wrong leads, most of them about &lt;a href= &#034;http://www.weiqigao.com/blog/2004/06/04/backups_rebuilds_upgrades.html&#034; &gt;mod_jk, which I custom compiled&lt;/a&gt; in the early days of this blog.&lt;/p&gt;

&lt;p&gt;It finally downed on me that perhaps I should read the documentations.  And what a good idea what was.  All I need to know is in the documentations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href= &#034;http://httpd.apache.org/docs/2.2/mod/mod_proxy_ajp.html&#034; &gt;Apache Module mod_proxy_ajp&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href= &#034;http://tomcat.apache.org/tomcat-6.0-doc/connectors.html&#034; &gt;Apache Tomcat 6.0
Connectors How To&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The gist of the documentation can be distilled to three sentences: Apache 2.2.9 includes mod_proxy_ajp support.  Tomcat 6.0.18 is configured with an AJP connector by default.  All I need to do is to enable mod_proxy_ajp and then tell it where my webapp is.&lt;/p&gt;

&lt;p&gt;To enable mod_proxy_ajp I used the command:&lt;/p&gt;

&lt;pre style=&#034;margin-left:3em&#034;&gt;[root@gao-2009] # &lt;b&gt;a2enmod mod_proxy_ajp&lt;/b&gt;&lt;/pre&gt;

&lt;p&gt;To tell Apache 2.2.9 where my webapp is I added &lt;tt&gt;/etc/apache2/conf.d/proxy_ajp&lt;/tt&gt; with the following content:&lt;/p&gt;

&lt;pre style=&#034;margin-left:3em&#034;&gt;ProxyPass /blog ajp://localhost:8009/blog
ProxyPassReverse /blog ajp://localhost:8009/blog

&amp;lt;Proxy /blog&gt;
  Order deny,allow
  Allow from all
&amp;lt;/Proxy&gt;&lt;/pre&gt;

&lt;p&gt;It turns out I also need to edit &lt;tt&gt;/etc/apache2/mods-enabled/proxy.conf&lt;/tt&gt; to change a line that says &lt;tt style=&#034;font-weight:bold&#034;&gt;Deny from all&lt;/tt&gt; into &lt;tt style=&#034;font-weight:bold&#034;&gt;Allow from all&lt;/tt&gt;.  Without this change, noone can access the blog and I get error message that reads:&lt;/p&gt;

&lt;pre style=&#034;margin-left:3em&#034;&gt;... client denied by server configuration: proxy:ajp://localhost:8009/...&lt;/pre&gt;

&lt;p&gt;That&#039;s all there is to it.&lt;/p&gt;
        </description>
      
      
    
    
    
    <comments>http://www.weiqigao.com/blog/2008/12/23/tomcat_6_0_18_apache_2_2_9_proxy_ajp_on_ubuntu_8_10_almost_trivial.html#comments</comments>
    <guid isPermaLink="true">http://www.weiqigao.com/blog/2008/12/23/tomcat_6_0_18_apache_2_2_9_proxy_ajp_on_ubuntu_8_10_almost_trivial.html</guid>
    <pubDate>Wed, 24 Dec 2008 02:15:11 GMT</pubDate>
  </item>
  
  <item>
    <title>Upgraded Weblog Software To Pebble 2.3.1</title>
    <link>http://www.weiqigao.com/blog/2008/08/07/upgraded_weblog_software_to_pebble_2_3_1.html</link>
    
      
        <description>
          &lt;p&gt;You won&#039;t feel it too much, but I have migrated this blog from gao-2002 (a.k.a my wife&#039;s workstation) to gao-2006 (my workstation), in order to give gao-2002 a much needed OS upgrade, from
Fedora Core 6 to something newer, maybe Fedora 9.&lt;/p&gt;

&lt;p&gt;I had a false start on Sunday when my first attempt resulted in some errors.  I spent the last few evenings experimenting with different migration procedures.  The final move this evening took me about 27 minutes, from 8:43pm to 9:10pm, most of the time was spent on customizing the page templates.&lt;/p&gt;

&lt;p&gt;Here&#039;s some parameters of the new setup of this blog:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AMD Athlon(tm) 64 Processor 3500+&lt;/li&gt;
&lt;li&gt;cpu MHz: 2210.216&lt;/li&gt;
&lt;li&gt;Debian GNU/Linux 4.0&lt;/li&gt;
&lt;li&gt;&lt;span style=&#034;color:red&#034;&gt;Java 6 OpenJDK&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Apache Web Server 2.2.3&lt;/li&gt;
&lt;li&gt;apache2.2-common including proxy_ajp&lt;/li&gt;
&lt;li&gt;Tomcat 5.5.26&lt;/li&gt;
&lt;li&gt;Pebble 2.3.1&lt;/li&gt;
&lt;li&gt;JavaMail 1.4.1&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;[&lt;b&gt;Update&lt;/b&gt;] I&#039;m having some additional challenges with the new setup.  When I saved this blog entry, I received an error page.  I&#039;ll see if I can get this blog entry published by some other means.  The worse thing that can happen is this blog may become unreadable for a short time.&lt;/p&gt;

&lt;p&gt;[&lt;b&gt;Update&lt;/b&gt;] The above attempt did result in the home page not rendering correctly.  I reindexed the whole blog.  I hope this time it works.&lt;/p&gt;

&lt;p&gt;[&lt;b&gt;Update&lt;/b&gt;] OK.  It finally worked.  It&#039;s 11:46pm now.  Time for bed.&lt;/p&gt;
        </description>
      
      
    
    
    
    <comments>http://www.weiqigao.com/blog/2008/08/07/upgraded_weblog_software_to_pebble_2_3_1.html#comments</comments>
    <guid isPermaLink="true">http://www.weiqigao.com/blog/2008/08/07/upgraded_weblog_software_to_pebble_2_3_1.html</guid>
    <pubDate>Fri, 08 Aug 2008 04:51:15 GMT</pubDate>
  </item>
  
  </channel>
</rss>

