You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs@cocoon.apache.org by st...@outerthought.org on 2003/02/11 23:00:03 UTC

[WIKI-UPDATE] BeginnerDefaultPort Tue Feb 11 23:00:03 2003

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.



Re: [WIKI-UPDATE] BeginnerDefaultPort Tue Feb 11 23:00:03 2003

Posted by Diana Shannon <sh...@apache.org>.
On Wednesday, February 12, 2003, at 04:43  AM, SAXESS - Hussayn Dabbous 
wrote:

> How to proceed ?
> ----------------
> I just get doubts, if this page could ever be of value, because
> i can't describe all possible scenarios, i can't tell a default 
> scenario, i'm simply lost here ...

I think you need to give yourself a well-deserved break. No question 
*if* your page could ever be of value -- it already is. I think all any 
doc-writer can do is describe the scenarios he or she feels comfortable 
describing after learning/implementing as much as his or her 
time/resources/knowledge/learning allows. Leave it for someone else to 
fill in the holes. Have a little faith that someone will come along and 
add to your doc. You write excellent docs. Who wouldn't want to 
supplement such good work?

> I would appreciate, if someone who is more familiar with
> tomcat-apache setup to make a review of this page and give
> me some hints, what i could do about managing complexity ;-)

I do hope others can provide hints and suggestions, but all you can do 
is ask (as you already have). I know it remains *really* hard for me to 
write partial docs. I know, in the past (pre-Wiki), I held off 
committing 90% completed docs -- even throwing them away -- because they 
weren't "good enough" to my perfectionist mind. Silly me.

Sometimes I email people off list who seem to have the knowledge I need 
to fill in some of my conceptual holes. In other words, they provide 
info, I finish the doc. I have *always* been helped that way. Perhaps 
some of the cocoon-oriented ISPs could be queried (unless this setup 
info is considered too strategic to share). Just an idea.

Thanks for all of your persistence and excellent contributions. Remember 
holes in your docs are simply "itches to scratch" -- ways to bring in 
more doc-writers.

Diana


Re: [WIKI-UPDATE] BeginnerDefaultPort Tue Feb 11 23:00:03 2003

Posted by SAXESS - Hussayn Dabbous <da...@saxess.com>.
I realise a big problem with this apache-tomcat connecting issue.

the problem
-----------
There is a manifold of apache-installation patterns,
depending on OS, SSL, virtual hosting and so on. Then there
is a slight shift of "defaults" depending of the versions of
apache and especially tomcat (e.g. Connectors default is moving)
Which scenario would be the "default scenario" ? i can't tell.
But the configuration of the apache-tomcat bridge is "slightly"
dependent of this. questions raise:

* where shall i put my mod_jk.conf and worker.properties
   in my scenario ?
* When should i use the auto-configuration option of tomcat ?
* How do i switch on auto-configa after all?
   (again this depends on the tomcat-version you use...)
* Do i have jk2 support on my webserver. What to do, if not?
* Why should i switch from ajp12 to jk ?

A manifold of other questions raise.


possible short term solutions
-----------------------------
OK, i can reduce the complexity by telling the user:

* use tomcat-4.1.18
* use apache-1.3.26 without SSL and no virtual hosting

That would make the description much easier, but would this
be of common value ?

Or i can point to the docs of apache and tomcat. For a
beginner this seems to be of no good, except they are already
familiar with administration...


How to proceed ?
----------------
I just get doubts, if this page could ever be of value, because
i can't describe all possible scenarios, i can't tell a default 
scenario, i'm simply lost here ...

I would appreciate, if someone who is more familiar with
tomcat-apache setup to make a review of this page and give
me some hints, what i could do about managing complexity ;-)


A possible long term solution:
------------------------------
Maybe we should create some sort of "configuration wizard", that
gets some pointers to tomcat and apache locations, figures out
what is going on and spills out the perfect config and a
"TODO list" for things that still have to be done manually ?
This in fact should not be so hard to afford, tomcat is almoust
there with its' autoconfig-generation option.

regards, Hussayn

Steven Noels wrote:
> SAXESS - Hussayn Dabbous wrote:
> 
>> hy;
>>
>> i am afraid the Wiki Page for begginers on connecting tomcat with apache
>> has gone out of control. Anyone there, who could help me
>> getting this back into a convenient shape ?
> 
> 
> Hussayn, what do you mean with 'gone out of control'?
> 
> </Steven>

-- 
Dr. Hussayn Dabbous
SAXESS Software Design GmbH
Neuenhöfer Allee 125
50935 Köln
Telefon: +49-221-56011-0
Fax:     +49-221-56011-20
E-Mail:  dabbous@saxess.com


Re: [WIKI-UPDATE] BeginnerDefaultPort Tue Feb 11 23:00:03 2003

Posted by Steven Noels <st...@outerthought.org>.
SAXESS - Hussayn Dabbous wrote:

> hy;
> 
> i am afraid the Wiki Page for begginers on connecting tomcat with apache
> has gone out of control. Anyone there, who could help me
> getting this back into a convenient shape ?

Hussayn, what do you mean with 'gone out of control'?

</Steven>
-- 
Steven Noels                            http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at            http://blogs.cocoondev.org/stevenn/
stevenn at outerthought.org                stevenn at apache.org


Re: [WIKI-UPDATE] BeginnerDefaultPort Tue Feb 11 23:00:03 2003

Posted by SAXESS - Hussayn Dabbous <hu...@saxess.com>.
hy;

i am afraid the Wiki Page for begginers on connecting tomcat with apache
has gone out of control. Anyone there, who could help me
getting this back into a convenient shape ?

regards, husayn

stevenn@outerthought.org wrote:

> 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.

--
Dr. Hussayn Dabbous
SAXESS Software Design GmbH
Neuenhöfer Allee 125
D-50935 Köln
tel.:+49 221 56011 0
fax.:+49 221-56011 20
email:dabbous@saxess.com