<?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>atc &#187; apache</title>
	<atom:link href="http://blog.beplacid.net/tag/apache/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.beplacid.net</link>
	<description>Musings of technology, sport, life et al</description>
	<lastBuildDate>Thu, 10 Jun 2010 10:24: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>Ant TODO Update</title>
		<link>http://blog.beplacid.net/2010/01/02/ant-todo-update/</link>
		<comments>http://blog.beplacid.net/2010/01/02/ant-todo-update/#comments</comments>
		<pubDate>Sat, 02 Jan 2010 21:34:38 +0000</pubDate>
		<dc:creator>atc</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Quick post]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://blog.beplacid.net/?p=111</guid>
		<description><![CDATA[Quick update regarding Ant TODO: there&#8217;s now a JAR available for download, so you can get it running even quicker!

  addthis_url    = 'http%3A%2F%2Fblog.beplacid.net%2F2010%2F01%2F02%2Fant-todo-update%2F';
  addthis_title  = 'Ant+TODO+Update';
  addthis_pub    = '';

]]></description>
			<content:encoded><![CDATA[<p>Quick update regarding <a title="Ant TODO" href="http://code.google.com/p/ant-todo/" target="_blank">Ant TODO</a>: there&#8217;s now a <a title="Ant TODO downloads" href="http://code.google.com/p/ant-todo/downloads/list" target="_blank">JAR available for download</a>, so you can get it running even quicker!</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fblog.beplacid.net%2F2010%2F01%2F02%2Fant-todo-update%2F';
  addthis_title  = 'Ant+TODO+Update';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://blog.beplacid.net/2010/01/02/ant-todo-update/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Ant Task for TODOs</title>
		<link>http://blog.beplacid.net/2009/12/31/apache-ant-task-todo/</link>
		<comments>http://blog.beplacid.net/2009/12/31/apache-ant-task-todo/#comments</comments>
		<pubDate>Thu, 31 Dec 2009 15:58:35 +0000</pubDate>
		<dc:creator>atc</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Quick post]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[ant]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[todo]]></category>

		<guid isPermaLink="false">http://blog.beplacid.net/?p=108</guid>
		<description><![CDATA[I often felt the need to scratch an itch when it comes to source code and a little fragment called //TODO. It&#8217;s scattered everywhere; I&#8217;m sure you&#8217;ve seen it. Yet no matter what codebase you&#8217;re looking at, there&#8217;s never any real exposure to them.
I therefore decided to implement an Ant Task for parsing TODOs in [...]]]></description>
			<content:encoded><![CDATA[<p>I often felt the need to scratch an itch when it comes to source code and a little fragment called //TODO. It&#8217;s scattered everywhere; I&#8217;m sure you&#8217;ve seen it. Yet no matter what codebase you&#8217;re looking at, there&#8217;s never any real exposure to them.</p>
<p>I therefore decided to implement an Ant Task for parsing TODOs in source code. You can read more about it over on the <a href="http://code.google.com/p/ant-todo/" target="_blank">Google Code project</a>. Please feel free to review code, <a title="Ant TODO requirements" href="http://code.google.com/p/ant-todo/" target="_blank">suggest features</a> or <a title="Getting started with Ant TODO" href="http://code.google.com/p/ant-todo/wiki/GettingStarted">try it out</a> and <a href="http://code.google.com/p/ant-todo/issues/list">report a bug</a>.</p>
<p>Happy new year to all; many happy returns.</p>
<p>See you in 2010!</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fblog.beplacid.net%2F2009%2F12%2F31%2Fapache-ant-task-todo%2F';
  addthis_title  = 'Ant+Task+for+TODOs';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://blog.beplacid.net/2009/12/31/apache-ant-task-todo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Server Benchmarking Diary &#8211; Debian, Apache 2 and MySQL</title>
		<link>http://blog.beplacid.net/2008/09/05/server-benchmarking-tips-debian/</link>
		<comments>http://blog.beplacid.net/2008/09/05/server-benchmarking-tips-debian/#comments</comments>
		<pubDate>Fri, 05 Sep 2008 20:32:16 +0000</pubDate>
		<dc:creator>atc</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Site News]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[ab]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[benchmarking]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[htop]]></category>
		<category><![CDATA[slicehost]]></category>
		<category><![CDATA[traffic]]></category>
		<category><![CDATA[website]]></category>
		<category><![CDATA[wget]]></category>

		<guid isPermaLink="false">http://blog.beplacid.net/2008/09/05/server-benchmarking-tips-debian/</guid>
		<description><![CDATA[This blog took nearly 7 thousand hits yesterday. At its peak, it took 1.8 thousand an hour. That&#8217;s a decent amount of traffic. This was all brought about when I submitted a link to reddit.com regarding a way to crash Google Chrome instantly. Coincidentally, I had spent an hour or so the night before testing [...]]]></description>
			<content:encoded><![CDATA[<p>This blog took nearly 7 thousand hits yesterday. At its peak, it took 1.8 thousand an hour. That&#8217;s a decent amount of traffic. This was all brought about when I submitted a link to <a href="http://reddit.com" title="Reddit ">reddit.com</a> regarding <a href="http://blog.beplacid.net/2008/09/04/tasty-google-chrome-bug-so-much-for-isolated-tabsprocesses/" title="Google Chrome - so much for isolated tabs">a way to crash Google Chrome instantly</a>. Coincidentally, I had spent an hour or so the night before testing the stability of my <a href="http://slicehost.com" title="Slicehost Xen Hosting">Slicehost</a> Xen virtual machine (more info <a href="http://blog.beplacid.net/2008/09/04/tasty-google-chrome-bug-so-much-for-isolated-tabsprocesses/" title="Slicehost migration">here</a>) just out of curiosity. I was using <em>wget</em>, <em>ab</em> (Apache benchmarking tool) and <em>htop</em> to mirror, send concurrent requests and monitor respectively. I&#8217;m going to document my findings here.</p>
<h3>What I&#8217;m Running</h3>
<p>Here&#8217;s a rundown of what sites I&#8217;m running and the software used.</p>
<ul>
<li><a href="http://beplacid.net">beplacid.net</a> &#8211; Apache 2, Django (Python framework), MySQL (one instance)</li>
<li>blog.beplacid.net &#8211; PHP 5, MySQL, Wordpress</li>
<li><a href="http://readingcamra.org.uk">readingcamra.org.uk</a> &#8211; Apache Tomcat 6, Java 5, MySQL</li>
<li><a href="http://readingbeerfestival.org.uk" title="Reading Beer Festival website">readingbeerfestival.org.uk</a> &#8211; As above</li>
</ul>
<h3>Wget &#8211; the Swiss army knife of HTTP command line tools</h3>
<p>Wget&#8217;s one of those tools you really take for granted. It&#8217;s versatile, reliable, simple and most importantly &#8211; it does its job very well. One of its nicest features is the <em>&#8211;mirror</em> option. This allows you to&#8230;mirror a given website. I initially thought of running multiple instances of wget at the same time. I started small at first: one instance running to mirror the entire <a href="http://beplacid.net" title="beplacid.net">site</a>. I ran the following in a shell:</p>
<blockquote><p>alex@prometheus:/tmp$ wget &#8211;mirror beplacid.net/</p></blockquote>
<p>It&#8217;s simple: mirror beplacid.net. Watching the processes and CPU usage on the server, it became apparent that  this wasn&#8217;t going to do much. The CPU usage didn&#8217;t exceed 5% on its first core. I had to rethink. Then <em>ab</em> sprung to mind.</p>
<h3>ab &#8211; Apache benchmarking tool</h3>
<p>This is another useful tool. It&#8217;s simple to use and allows you to quickly and easily hit a given hostname with HTTP requests, all tailored to your specific needs. To do all this, however, you need to be running as root. A noble security measure.</p>
<p>I wanted to generate some traffic that would put the server under some strain, so I started with 50 requests and 5 at a time:</p>
<blockquote><p>prometheus:/root$ ab -n 50 -c 5 beplacid.net/</p></blockquote>
<p>Now things started to get fun. This peaked CPU usage to 94% on one core, the others were between 60 and 80. I was starting to see some real stats. I doubled things &#8211; 100 with 10 per request:</p>
<blockquote><p> prometheus:/root$ ab -n 100 -c 10 beplacid.net/</p></blockquote>
<p>This was a little more representative of a heavy amount of traffic. Perhaps akin to slashdot or a reddit. Put simply, that&#8217;s 100 requests with 10 each sent each time. Still nothing major, so I went all out:</p>
<blockquote><p>Concurrency Level:      10<br />
Complete requests:      1000<br />
Total transferred:      4856792 bytes<br />
HTML transferred:       4687792 bytes<br />
Requests per second:    4.99 [#/sec] (mean)<br />
Time per request:       2002.453 [ms] (mean)<br />
Time per request:       200.245 [ms] (mean, across all concurrent requests)<br />
Transfer rate:          23.69 [Kbytes/sec] received</p></blockquote>
<p>To summarise, the server took 1000 requests with an average of 5 per second, each returning just over 2 seconds. Not bad, considering what I&#8217;m running.</p>
<p>I&#8217;m pleased with my setup. It can take a punch and it&#8217;s still running. My next task is to hit both beplacid.net and the blog, with perhaps some traffic mirroring readingbeerfestival.org.uk too.</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fblog.beplacid.net%2F2008%2F09%2F05%2Fserver-benchmarking-tips-debian%2F';
  addthis_title  = 'Server+Benchmarking+Diary+%26%238211%3B+Debian%2C+Apache+2+and+MySQL';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://blog.beplacid.net/2008/09/05/server-benchmarking-tips-debian/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>HOWTO: Apache 2, Tomcat 5.5.25 and mod_jk and Debian</title>
		<link>http://blog.beplacid.net/2007/11/20/howto-apache-2-tomcat-5525-and-mod_jk-under-debian/</link>
		<comments>http://blog.beplacid.net/2007/11/20/howto-apache-2-tomcat-5525-and-mod_jk-under-debian/#comments</comments>
		<pubDate>Tue, 20 Nov 2007 10:58:12 +0000</pubDate>
		<dc:creator>atc</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[mod_jk]]></category>
		<category><![CDATA[tomcat]]></category>
		<category><![CDATA[virtual host]]></category>

		<guid isPermaLink="false">http://blog.beplacid.net/2007/11/20/howto-apache-2-tomcat-5525-and-mod_jk-under-debian/</guid>
		<description><![CDATA[Update: It&#8217;s been said that this howto will also work for Tomcat 6. I&#8217;ve not tested it, but I&#8217;d assume it would work considering the manual aspects of the installation and the unlikely event that Tomcat 6 would&#8217;ve changed its directory structure considerably. If you find evidence to the contrary, please let me know.
Introduction
This HowTo [...]]]></description>
			<content:encoded><![CDATA[<p><span style="font-weight: bold"><span style="text-decoration: underline">Update:</span> </span>It&#8217;s been said that this howto will also work for Tomcat 6. I&#8217;ve not tested it, but I&#8217;d assume it would work considering the manual aspects of the installation and the unlikely event that Tomcat 6 would&#8217;ve changed its directory structure considerably. If you find evidence to the contrary, please let me know.</p>
<p><span style="font-weight: bold">Introduction</span><br />
This HowTo explains the installation and configuration of Apache 2.2.3, Tomcat 5.5.25 and the Apache Jakarta module &#8212; a connector/proxy for Apache &amp; Tomcat &#8212; under Debian Etch. It is geared towards those who already have experience configuring Apache and Tomcat and are aware of the basic principles behind Apache modules.</p>
<p><span style="font-weight: bold">Prerequisites</span><br />
A working installation of Debian GNU/Linux that has an internet connection, or valid CD-ROM apt packages disc.</p>
<p><span style="font-weight: bold">Step 1: Installing Apache</span><br />
If you don&#8217;t already have Apache installed, you will need to run the following in a shell as root:</p>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
<tr>
<td><span class="genmed"><strong>Shell:</strong></span></td>
</tr>
<tr>
<td class="code">apt-get install apache2</td>
</tr>
</table>
<p><span class="postbody"></span></p>
<p>This will install Apache 2 and any relevant dependencies. Configuration files for Apache can be found under /etc/apache2, and host-specific configuration are found under /etc/apache2/sites-available/. This is where you should configure your individual Virtual Hosts, as opposed to placing the configuration in /etc/apache2/apache2.conf.</p>
<p><span style="font-weight: bold">Step 2: Install mod_jk</span><br />
Using apt, you need to install the Apache Jakarta module by executing the following in a shell as root:</p>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
<tr>
<td><span class="genmed"><strong>Shell:</strong></span></td>
</tr>
<tr>
<td class="code">apt-get install libapache2-mod-jk</td>
</tr>
</table>
<p><span class="postbody"></span></p>
<p>The module may need enabling via &#8216;a2enmod jk&#8217;, but it is not necessary at this time. Go ahead and execute the following as root:</p>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
<tr>
<td><span class="genmed"><strong>Shell:</strong></span></td>
</tr>
<tr>
<td class="code">a2enmod jk</td>
</tr>
</table>
<p><span class="postbody"></span></p>
<p>Running the above should return a message similar to &#8216;Module enabled, now run /etc/init.d/apache2 force-reload&#8217;. I do not recommend reloading Apache&#8217;s configuration until everything has been installed and setup. This will ensure Apache remains usable while you setup Tomcat in the next step.</p>
<p><span style="font-weight: bold">Step 3: Download and Extract Apache Tomcat 5.5.25</span><br />
There&#8217;s a reason I installed Tomcat manually: Debian&#8217;s Tomcat package is a mess. The default package splits, amongst others, the webapps and conf folders. Whilst the conf folder is situated in a respectable location (/etc/tomcat5), the webapps directory is symlink&#8217;d under /var/, which tends to cause problems with Apache-&gt;Tomcat configuration. Therfore, I have chosen to manually install Tomcat using the .tar.gz from tomcat.apache.org; as well as this being a recommendation from various people in the #tomcat channel on irc.freenode.net. In short, it&#8217;s a configuration and administration nightmare.</p>
<p>Download Apache Tomcat 5.5.25 from here: <a href="http://tomcat.apache.org/download-55.cgi" target="_blank">http://tomcat.apache.org/download-55.cgi</a> (select a mirror) and extract it to <span style="font-weight: bold">one</span> of the following locations (I used /usr/share/):</p>
<ul>
<li> /usr/local/</li>
<li> /usr/share/</li>
</ul>
<p>To do the above, execute these commands as root:</p>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
<tr>
<td><span class="genmed"><strong>Shell:</strong></span></td>
</tr>
<tr>
<td class="code">mv apache-tomcat-5.5.25.tar.gz /usr/share/; cd /usr/share<br />
tar zxvf apache-tomcat-5.5.25.tar.gz; mv apache-tomcat-5.5.25 tomcat-5.5.25</td>
</tr>
</table>
<p><span class="postbody"></span></p>
<p>Now, let&#8217;s setup a user and group so we can provide safe permission control over the conf and webapps directories.</p>
<p><span style="font-weight: bold">Step 4: Add a tomcat user and group</span></p>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
<tr>
<td><span class="genmed"><strong>Shell:</strong></span></td>
</tr>
<tr>
<td class="code">adduser tomcat &amp;&amp; addgroup tomcat; cd /usr/share/tomcat-5.5.25</td>
</tr>
</table>
<p><span class="postbody"></span></p>
<p>We&#8217;ve just created the tomcat user &amp; group, so let&#8217;s apply the ownership permissions to the webapps directory:</p>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
<tr>
<td><span class="genmed"><strong>Shell:</strong></span></td>
</tr>
<tr>
<td class="code">chown -R tomcat:tomcat webapps; chmod -R 775 webapps</td>
</tr>
</table>
<p><span class="postbody"></span></p>
<p>This now means that any user who&#8217;s in the tomcat group can read, write and execute files under the webapps directory.</p>
<p><span style="font-style: italic">Note: if you use a specific user and group such as www-data for Apache ownership and execution, which is the default in Debian, you will need to add &#8216;tomcat&#8217; to the www-data user&#8217;s groups:</span></p>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
<tr>
<td><span class="genmed"><strong>Shell:</strong></span></td>
</tr>
<tr>
<td class="code">usermod -aG tomcat www-data</td>
</tr>
</table>
<p><span class="postbody"></span></p>
<p>The following is optional, as it sets the group permissions of the server.xml to writable by the tomcat group. This may not be what you want, so be careful!</p>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
<tr>
<td><span class="genmed"><strong>Shell:</strong></span></td>
</tr>
<tr>
<td class="code">cd conf; chmod g+w server.xml</td>
</tr>
</table>
<p><span class="postbody"></span></p>
<p>Now that we&#8217;ve setup the most important directories, let&#8217;s make the tomcat startup and shutdown bash scripts executable, ready for starting it up:</p>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
<tr>
<td><span class="genmed"><strong>Shell:</strong></span></td>
</tr>
<tr>
<td class="code">cd /usr/share/tomcat-5.5.25/bin/; chmod 755 shutdown.sh startup.sh</td>
</tr>
</table>
<p><span class="postbody"></span></p>
<p><span style="font-weight: bold">Step 4: Create the workers.properties File</span><br />
Create the following file, as root, under /etc/apache2 or a directory of your choice (/usr/share/tomcat-5.5.25/conf would also be fine), but make sure it&#8217;s readable by the tomcat user and/or group.</p>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
<tr>
<td><span class="genmed"><strong>File:</strong></span></td>
</tr>
<tr>
<td class="quote">#<br />
# This file provides minimal jk configuration properties needed to<br />
# connect to Tomcat.<br />
#<br />
# We define a worker named &#8216;default&#8217;<br />
#workers.tomcat_home=/usr/share/tomcat5.5/<br />
workers.java_home=/usr/lib/jvm/java-1.5.0-sun/<br />
ps=/<br />
worker.list=default<br />
worker.default.port=8009<br />
worker.default.host=localhost<br />
worker.default.type=ajp13<br />
worker.default.lbfactor=1</td>
</tr>
</table>
<p><span class="postbody"></span></p>
<p>The &#8216;worker.list&#8217; parameter defines the names for the ajp13 connector(s). This is what Apache talks to. You can specify a name of your choice, but make sure you remember it for later, and ensure you&#8217;ve changed all parameters beginning with &#8216;worker.default&#8217; to the name you&#8217;ve set.</p>
<p><span style="font-weight: bold">Step 5: Configure an Apache to Talk To Tomcat and add a Virtual Host</span><br />
This step is the most important part. It assumes that you&#8217;re using virtual hosts for Apache (you may not be), so if that isn&#8217;t the case, just place the JkMount configuration lines in the Virtual Host section along with the config. below in your main apache file (/etc/apache2/apache2.conf).</p>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
<tr>
<td><span class="genmed"><strong>File:</strong></span></td>
</tr>
<tr>
<td class="code"># mod_jk config<br />
# Where to find workers.properties<br />
JkWorkersFile /etc/apache2/workers.properties# Where to put jk logs<br />
JkLogFile     /var/log/apache2/jk.log# Set the jk log level [debug/error/info]<br />
JkLogLevel info# Select the log format<br />
JkLogStampFormat &#8220;[%a %b %d %H:%M:%S %Y] &#8220;#JkOptions indicate to send SSL KEY SIZE,<br />
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories# JkRequestLogFormat set the request format<br />
JkRequestLogFormat &#8220;%w %V %T&#8221;</td>
</tr>
</table>
<p><span class="postbody"></span></p>
<p>For my virtual host, I created the following configuration file under /etc/apache2/sites-available:</p>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
<tr>
<td><span class="genmed"><strong>File:</strong></span></td>
</tr>
<tr>
<td class="code">&lt;VirtualHost *:80&gt;<br />
ServerName abc.myhost.com<br />
ServerAdmin <a href="mailto:webmaster@abc.myhost.com">webmaster@abc.myhost.com</a><br />
JkMount /* default<br />
JkMount /*.jsp default<br />
DirectoryIndex index.jsp index.html<br />
# Globally deny access to the WEB-INF directory<br />
&lt;LocationMatch &#8216;.*WEB-INF.*&#8217;&gt;<br />
AllowOverride None<br />
deny from all<br />
&lt;/LocationMatch&gt;<br />
&lt;/VirtualHost&gt;</td>
</tr>
</table>
<p><span class="postbody"></span></p>
<p>The most important lines in the above quote are the following:</p>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
<tr>
<td><span class="genmed"><strong>Shell:</strong></span></td>
</tr>
<tr>
<td class="code">JkMount /* default<br />
JkMount /*.jsp default</td>
</tr>
</table>
<p><span class="postbody"></span></p>
<p>These two lines specify the URL paths that should be handed to mod_jk and thus Tomcat. The &#8216;default&#8217; section of the line specifies the JK worker identifier. <span style="font-weight: bold">This <span style="text-decoration: underline">must</span> match the name you specified in the workers.properties file!</span></p>
<p>That&#8217;s the configuration done, let&#8217;s fire this baby up!</p>
<p><span style="font-weight: bold">Step 5: Unleashing the Beast; Starting Apache &amp; Tomcat</span><br />
To ensure a clean start up, I recommend stopping Apache entirely, and then starting up Tomcat, then Apache. Do so by executing the following commands (as root, see the note blow otherwise)::</p>
<table align="center" border="0" cellpadding="3" cellspacing="1" width="90%">
<tr>
<td><span class="genmed"><strong>Shell:</strong></span></td>
</tr>
<tr>
<td class="code">/etc/init.d/apache2 stop<br />
/usr/share/tomcat-5.5.25/bin/startup.sh<br />
/etc/init.d/apache2 start</td>
</tr>
</table>
<p><span class="postbody"></span></p>
<p><span style="font-style: italic">Note: if you want tomcat to run as a separate user but keep ownership as root, use jsvc and the -user flag to specify the user it should change to at startup.</span></p>
<p>Both Tomcat and Apache should startup without error, and you should now be able to connect to Apache and the Tomcat via the specified Virtual Host.</p>
<script type="text/javascript">
  addthis_url    = 'http%3A%2F%2Fblog.beplacid.net%2F2007%2F11%2F20%2Fhowto-apache-2-tomcat-5525-and-mod_jk-under-debian%2F';
  addthis_title  = 'HOWTO%3A+Apache+2%2C+Tomcat+5.5.25+and+mod_jk+and+Debian';
  addthis_pub    = '';
</script><script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
]]></content:encoded>
			<wfw:commentRss>http://blog.beplacid.net/2007/11/20/howto-apache-2-tomcat-5525-and-mod_jk-under-debian/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
	</channel>
</rss>
