Page: http://wiki.cocoondev.org/Wiki.jsp?page=BeginnerDefaultPort, version: 3 
on Tue Feb 11 21:27:49 2003 by Dabbous

+ I will show you how you can setup tomcat and apache in order
+ to serve your cocoon application transparently from your webserver.
+ I will use the ajp13 comunication protocol, because this protocol
+ is the default used in tomcat-4.1.* and it is supported down to tomcat-3.2.*
+ 
+ * basic knowledge about apache administration
+ * basic knowledge about tomcat administration
+ 
+ *You need mod_jk be installed on your server.
- please have a look at [CocoonAndApache] and 
?        ^ ^

+ please take a look at [CocoonAndApache] and 
?        ^ ^

- the webserver and tomcat. Here we go:
+ the webserver and tomcat. You can read the very comprehensive doc about
+ this issue from 
[apache|http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/jk.html]. If you 
prefer to just set it up and don't bother, 
+ go on with this text. But be warned. I won't tell you anything about
+ the concepts. If you fail, you have to go to the official docs!
+ !Preparing tomcat
+ * Go to the {{$tomcatroot/conf}} folder and edit index.xml
+ * Search for the definition of the Ajp12 Connector.
+ * Add a new connector using following snippet:{{{
- !!The following text is in german. 
- 
- I will translate it asap... meanwhile please look into [CocoonAndApache] ...
- 
- !Vorbereiten des tomcat-servers
- * Editieren Sie die Datei {{$tomcatroot/conf/server.xml}}\\Fuegen Sie 
folgendes unterhalb des exisiterenden Ajp12 Connectors einen weiteren Connector 
wie folgt hinzu:\\{{{
-   <Parameter name="port" value="8093"/>
?                                    ^

+   <Parameter name="port" value="8090"/>
?                                    ^

- </Connector>}}}Achten Sie darauf, dass der Wert des port nicht mit dem Wert 
fuer den bereits bestehenden Ajp12ConnectionHandler kollidiert. Aendern Sie 
ggf. einen der beiden Werte um. Der Ajp12 Port wird nur noch intern fuer den 
tomcat shutdown gebraucht.
+ </Connector>}}}The value of the port is arbitrary. You only need to enshure, 
the port is not used elsewhere on your computer. Especially take care, that the 
ajp12 connector above does not already use the same port. The ajp12 connector 
is still used for shutdown of tomcat.''(Is this correct? HD)''.
- !Erzeugen der {{mod_jk.conf}} Datei und {{worker.properties}} Datei
?  ^ - ^^ -----                 - -----                        ------

+ !create {{mod_jk.conf}} and {{worker.properties}}
?  ^  ^^

+ You can let tomcat create these files for you. I prefer to give you two
+ sample files here, which you can cut/paste into your environment. These
+ files are furnitured to be used with cocoon. Both files will be placed into
+ your $apacheroot/conf folder:
- *Starten Sie den tomcat-Server durch. Dabei wird u.A. die Datei \\
-   {{$tomcatroot/conf/mod_jk.conf-auto}} erzeugt. 
- *Kopieren Sie die Datei {{$tomcatroot/conf/mod_jk.conf-auto}} nach 
{{$apacheroot/conf/mod_jk.conf}}
- *Kopieren Sie die Datei {{$tomcatroot/conf/worker.properties}} in das 
Verzeichnis $apacheroot/conf
- * Aendern Sie im Zielverzeichnis der vorherigen Kopieraktionen in der Datei 
{{mod_jk.conf}} den absoluten Pfad zu {{worker.properties}} so, dass er auf die 
eben gemachte Kopien verweist. Der Pfad muss absolut angegeben werden, oder 
relativ zum conf Verzeichnis des apacheservers ({{conf/worker.properties}})
- !Modifizieren der mod_jk.conf Datei
- *Ersetzen Sie in der Datei mod_jk.conf alle Eintraege zu ajp12 durch ajp13
- *Um die gesamte Webapplikation von tomcat zu serven, gehen Sie wie folgt vor:
- ** Kommentieren Sie den/die JKMount Eintrag/Eintraege fuer Ihre 
Webapplikation(en) aus.
- ** Schreiben Sie in einer neuen Zeile folgenden Inhalt:{{{JKMount 
/yourWebapp/* ajp13}}}
- * Suchen Sie nach einer Zeile, die mit "LoadModule" beginnt und modifizieren 
Sie diese Zeile wie folgt:\\{{{
- alte Version: LoadModule jk_module libexec/mod_jk.so
- neue Version: LoadModule jk_module libexec/mod_jk-1.3-eapi.so}}}
- In der Datei {{worker.properties}} werden die zu verwendenden Ports 
definiert. Bitte tragen Sie gemaess den vorher gemachten Angaben in server.xml 
(Connector Definition) den richtigen Port in die Datei worker.properties ein, 
z.B.
- {{{worker.ajp13.port=8093
- worker.ajp13.host=localhost
- worker.ajp13.type=ajp13}}}
+ !sample mod_jk.conf
+ The following snippet is the smallest possible definition. 
+ Please check all pathes and modify them for your environment:
+ {{{
+ <IfModule mod_jk.c>
+   JkWorkersFile /etc/httpd/conf/workers.properties
+   JkLogFile     /var/log/httpd/mod_jk.log
+   JkLogLevel error
+   JkMount /cocoon   cocoon
+   JkMount /cocoon/  cocoon
+   JkMount /cocon/*  cocoon
+ </IfModule>
+ }}}
+ Note, that with this definition all requests to /cocoon will be served fully
+ from cocoon. You may want to add rules to serve static content from
+ the server instead. If you want to know, how this works, please have a look
+ at ???
+ sample worker.properties
+ Please check all pathes and modify them for your environment:
+ {{{
+ workers.tomcat_home=/opt/tomcat/tomcat-4.1.18
+ workers.java_home=/opt/java/java-1.3.1
+ worker.list=cocoon
+ worker.cocoon.port=8090
+ worker.cocoon.host=localhost
+ worker.cocon.type=ajp13
+ }}}
+ Note: You can define as many workers as you like. But don't forget to place 
them into
+ the comma separated property {{worker.list}}. Now you can mount different 
URL-spaces to different tomcat servers...
+ !
- !Vorbereiten der apache konfiguration
- Im Verzeichnis {{$pacheroot/conf}} nach Properties suchen, die mit ApJServ 
beginnen. Alle Properties ausser den unten angegebenen Properties 
auskommentieren. Die folgende Liste von ApJ Properties aber
- unbedingt beibehalten:
- 
- |ApJServManual|on
- |ApJServSecretKey|DISABLED
- |ApJServMountCopy|on
- 
- In der Regel finden Sie Referenzen in der Datei httpsd.conf 
- Diese Referenzen kommentieren Sie zunaechst aus. Sie werden in Zukunft nicht 
mehr benoetigt.


Reply via email to