Tomcat 5 + Apache 1.3

Apache, Lighttpd, nginx, Cherokee
Post Reply
christian74
Posts: 13
Joined: 2004-01-16 20:14
Location: Hamburg
Contact:
 

Tomcat 5 + Apache 1.3

Post by christian74 »

Hallo Leute...

Ich versuche nun schon seit ein paar Tagen Apache 1.3 zusammen mit Tomcat 5.0.25 zum laufen zu bekommen. Klappt aber net!

Ich möchte gerne dazu die einzelnen WebApps in den jeweiligen Home-Verzeichnissen am laufen haben.

Bisher habe ich nur Tutorials zu Apache 2 mit Tomcat 5 gefunden, oder aber Apche 1.3 mit Tomcat 4. Brauch ich aber nicht!

Das ganze läuft auf einem Debian-System. Apache läuft einwandfrei, Tomcat für sich selbst auch (Port 8080).

Jetzt sollen die einzelnen WepApps allerdings nicht immer über

Code: Select all

http://www.XXXXXX.de:8080/servlet/test
angesprochen werden, sondern über Port 80. apache soll dann sozusagen als Proxy dienen.

Ich habe nach dem ich Apache 1.3 und Tomcat installiert hatte mit

Code: Select all

apt-get install libapache-mod-jk
versucht den Apache mit Tomcat zu verknüpfen. Bin dann bei meiner Recherche bei Google nur auf Beispiele für Apache 2 gestossen. Dementsprechend funktionierten keine Ã?nderungen an der server.xml des Tomcat, sowie die Einstellungen des Apache.

Das ganze ist nur auf einem lokalen Testsystem installiert. Bisher habe ich immer die Resin-Servlet Engine benutzt, da klappt das alles wunderbar. Mit Tomcat habe ich allerdings so meine Schwierigkeiten.

ich würd auch gerne erstmal bei Apache 1.3 bleiben und ungerne gleich den Apache 2 einsetzen.

Wer mir da Konfigurationsvorschläge machen kann, den bin ich sehr dankbar!
barto
Posts: 88
Joined: 2003-01-09 19:13
 

Re: Tomcat 5 + Apache 1.3

Post by barto »

Christian74 wrote:angesprochen werden, sondern über Port 80. apache soll dann sozusagen als Proxy dienen.
Versuch doch in deinen Apache mod_proxy zu laden, dann in der httpd.conf

Code: Select all

    ProxyRequests Off
    ProxyPass / http://www.XXXXXX.de:8080/
    ProxyPassReverse / http://www.XXXXXX.de:8080/
nn4l
Posts: 172
Joined: 2002-06-19 07:06
Contact:
 

Re: Tomcat 5 + Apache 1.3

Post by nn4l »

Meine workers.properties:

Code: Select all

# Set properties for worker3 (ajp13)
worker.worker3.type=ajp13
worker.worker3.host=xxx.yyy.zzz.aaa
worker.worker3.port=8009
worker.worker3.lbfactor=50
worker.worker3.cachesize=10
worker.worker3.cache_timeout=600
worker.worker3.socket_keepalive=1
worker.worker3.socket_timeout=300
In meiner Apache httpd.conf steht:

Code: Select all

LoadModule jk_module          libexec/mod_jk.so
AddModule mod_jk.c

....

# Where to find workers.properties
# Update this path to match your conf directory location (put workers.properties next to httpd.conf)
JkWorkersFile /opt/apache/conf/workers.properties

# Where to put jk logs
# Update this path to match your logs directory location (put mod_jk.log next to access_log)
JkLogFile /var/log/mod_jk.log

# Set the jk log level [debug/error/info]
JkLogLevel error

# Select the log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "

# JkOptions indicate to send SSL KEY SIZE,
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories

# JkRequestLogFormat set the request format
JkRequestLogFormat "%w %V %T"

....

# im virtualhosts Abschnitt

....

  JkMount /app1* worker3
  JkMount /app1/* worker3
  RewriteEngine On
  RewriteRule ^/app1$ /app1/ [R=301,L]
In jakarta-tomcat-5.0.25-1/conf/Catalina/localhost/app1.xml steht:

Code: Select all

<!--
A sample configuration file for Tomcat 4.1.x.
Customize the docBase attribute, drop in your $CATALINA_HOME/webapps/ directory and restart Tomcat.
Note the JOTM dependencies; you'll need to copy various jars to Tomcat's common/lib/ directory.
See http://www.atlassian.com/software/jira/docs/latest/servers/tomcat41.html for details.
-->

<Context path="/app1" docBase="/home/app1.war" debug="0">
...
Man kann aber auch gleich die ausgepackten Klassendateien nach webapps/app1 kopieren, evtl. muss man dann noch was in WEB-INF konfigurieren.
schl
Posts: 343
Joined: 2003-02-05 11:26
Location: München/Unterschleißheim
 

Re: Tomcat 5 + Apache 1.3

Post by schl »

christian74
Posts: 13
Joined: 2004-01-16 20:14
Location: Hamburg
Contact:
 

Apache 1.3

Post by christian74 »

Nicht Apache 2, sondern 1.3 !!!
schl
Posts: 343
Joined: 2003-02-05 11:26
Location: München/Unterschleißheim
 

Re: Tomcat 5 + Apache 1.3

Post by schl »

ja, da musst Du etwas weiter unten schauen, da steht was zu apache 1.3
christian74
Posts: 13
Joined: 2004-01-16 20:14
Location: Hamburg
Contact:
 

Re: Tomcat 5 + Apache 1.3

Post by christian74 »

Ich find dort aber immer noch keine Beschreibung für die Kombination

Tomcat 5 mit Apache 1.3

Es wird immer nur Tomcat 4.xx mit Apache 1.3 erklärt !
majortermi
Userprojekt
Userprojekt
Posts: 916
Joined: 2002-06-17 16:09
 

Re: Tomcat 5 + Apache 1.3

Post by majortermi »

Wo liegt das Problem? Für die Tomcat-Seite nimmst du die Anleitung für Tomcat 5 und für die Apache-Seite die Anleitung für Apache 1.3. Du musst nur darauf achten, dass beide Anleitungen für mod_jk oder beide für mod_jk2 gelten, und nicht gemischt (das ginge zwar auch, dann ist es aber etwas schwerer zu verstehen).
Erst nachlesen, dann nachdenken, dann nachfragen... :)
Warum man sich an diese Reihenfolge halten sollte...
Post Reply