<?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>Everything is wrong &#187; Apache</title>
	<atom:link href="http://everythingiswrong.free.fr/index.php/tag/apache/feed/" rel="self" type="application/rss+xml" />
	<link>http://everythingiswrong.free.fr</link>
	<description>Un blog dédié à l&#039;informatique en général</description>
	<lastBuildDate>Wed, 06 Oct 2021 21:20:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>mod_jk : Apache &amp; tomcat</title>
		<link>http://everythingiswrong.free.fr/index.php/2011/08/19/mod_jk-apache-tomcat/</link>
		<comments>http://everythingiswrong.free.fr/index.php/2011/08/19/mod_jk-apache-tomcat/#comments</comments>
		<pubDate>Fri, 19 Aug 2011 19:49:29 +0000</pubDate>
		<dc:creator>Yan</dc:creator>
				<category><![CDATA[Java J2EE]]></category>
		<category><![CDATA[Système]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[mod_jk]]></category>
		<category><![CDATA[Tomcat]]></category>

		<guid isPermaLink="false">http://yan.langlois.free.fr/wordpress/?p=1585</guid>
		<description><![CDATA[Comment configurer le connecteur mod_jk pour faire fonctionner un serveur tomcat derrière un serveur Apache.]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">A chaque fois que j&#8217;essaie de configurer un tomcat derrière un serveur apache, je tombe toujours sur les mêmes problèmes, je perds toujours du temps à retrouver les mêmes solutions dans les documentations. C&#8217;est pour cela que j&#8217;écris cet article que j&#8217;espère le plus simple et pratique que possible.</p>
<p style="text-align: justify;">Après avoir installé les deux serveurs, il faut télécharger le module apache mod_jk (la version 1.2) sur ce site : <a href="http://tomcat.apache.org/download-connectors.cgi" target="_blank">http://tomcat.apache.org/download-connectors.cgi</a>.</p>
<p style="text-align: justify;">Déposer le fichier mod_jk.so (qui se trouve dans l&#8217;archive téléchargée) dans le répertoire <em>$APACHE_HOME/modules/</em>. Pour configurer ce connecteur, deux fichiers sont nécessaires</p>
<ul>
<li style="text-align: justify;">workers.properties : permet au connecteur de se connecter au serveur tomcat.</li>
<li style="text-align: justify;">httpd.conf : permet au connecteur de rediriger les requêtes HTTP vers le serveur tomcat.</li>
</ul>
<p style="text-align: justify;">Voici un fichier <em>worker.properties</em> exemple :</p>
<pre class="wp-caption" style="text-align: justify;">  # La liste des workers
  worker.list= worker1, jkstatus

  # Configuration du worker1 : connexion à tomcat
  worker.worker1.type=ajp13
  worker.worker1.host=localhost
  worker.worker1.port=8009

  # Configuration de jkstatus : agrège des statistiques sur le connecteur
  worker.jkstatus.type=status</pre>
<p style="text-align: justify;">Voici quelques lignes à ajouter au fichier <em>httpd.conf</em> pour configurer mod_jk :</p>
<pre class="wp-caption" style="text-align: justify;">  LoadModule    jk_module  modules/mod_jk.so
  JkWorkersFile workers.properties
  JkLogFile     /usr/local/apache/logs/mod_jk.log
  JkLogLevel    info
  JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "</pre>
<p style="text-align: justify;">Une fois cette communication faite il faut rendre les applications tomcat visibles depuis Apache. Cette étape peut être aussi bien réalisée à partir du fichier <em>httpd.conf</em> que <em>worker.properties</em>. Par exemple, voici la directive à ajouter au fichier de configuration du serveur Apache :</p>
<pre class="wp-caption" style="text-align: justify;">   JkMount /my-webapplication/* worker1
   JkMount /my-webapplication worker1
   JkMount /jkstatus* jkstatus</pre>
<p style="text-align: justify;">Il existe beaucoup d&#8217;autre façons de configurer ces deux serveurs. Pour plus d&#8217;information voici quelques sites qui décrivent dans les détails les différentes configurations possibles :</p>
<ul>
<li><a href="http://tomcat.apache.org/tomcat-3.3-doc/mod_jk-howto.html" target="_blank">http://tomcat.apache.org/tomcat-3.3-doc/mod_jk-howto.html</a></li>
<li><a href="http://tomcat.apache.org/connectors-doc/reference/apache.html" target="_blank">http://tomcat.apache.org/connectors-doc/reference/apache.html</a></li>
<li><a href="http://tomcat.apache.org/connectors-doc/generic_howto/workers.html" target="_blank">http://tomcat.apache.org/connectors-doc/generic_howto/workers.html</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://everythingiswrong.free.fr/index.php/2011/08/19/mod_jk-apache-tomcat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
