Weiterleitung Apache mit Tomcat über mod_jk funktioniert nicht...

navino

Aktives Mitglied
Hallo,

ich bin Neuling im Bereich des Apache Webservers...
Möchte gerne einen Apache Webserber vor meinen Tomcat vorschalten um Erfahrungen mit Load-Balance zu machen.
Haben einen lauffähigen Apache 2.2.17 und einen Tomcat 6.0.29.
Beide "Server" laufen soweit. Was allerdings nicht funktioniert ist das weiterleiten auf den Tomcat wenn ich z.B. http://localhost/emes eingebe.
Die Anwendung ist über http://localhost:8080/emes zu erreichen.

Meine Konfiguration sieht so aus:

workers.properties:

#Define 1 real worker using ajp13
worker.list=tomcat_worker
#Set properties for worker1 (ajp13)
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009

In der httpd.conf habe ich folgendes geändert:

#------------ Connect APACHE AND TOMCAT -------------------
#Load the connect module
LoadModule jk_module modules/mod_jk.so
# Where to find workers.properties
JkWorkersFile conf/workers.properties
# Where to put jk shared memory -> apache log
JkShmFile logs/mod_jk.shm
# Log directory of the mod
JkLogFile logs/mod_jk.log
# Set the jk log level [debug/error/info]
JkLogLevel info
# Select the timestamp log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
# Send everything for context /javaee to worker named worker1 (ajp13)
JkMount /emes/* tomcat_worker

Fehlt mir da noch was?
Der Server lassen sich ohne Fehler starten.


Gruß
navino
 
Hallo,

noch eine Information, im Log steht folgendes:
[Tue Nov 02 07:37:33 2010] [error] [client 127.0.0.1] File does not exist: C:/Apache2.2/htdocs/emes
 
Hallo,

klappt leider nicht.
Bekomme
Not Found

The requested URL /emes/ was not found on this server.

Das error.log sieht so aus:
[Tue Nov 02 09:34:55 2010] [notice] Apache/2.2.17 (Win32) mod_jk/1.2.30 configured -- resuming normal operations
[Tue Nov 02 09:34:55 2010] [notice] Server built: Oct 18 2010 01:58:12
[Tue Nov 02 09:34:55 2010] [notice] Parent: Created child process 2240
[Tue Nov 02 09:34:55 2010] [notice] Child 2240: Child process is running
[Tue Nov 02 09:34:55 2010] [notice] Child 2240: Acquired the start mutex.
[Tue Nov 02 09:34:55 2010] [notice] Child 2240: Starting 64 worker threads.
[Tue Nov 02 09:34:55 2010] [notice] Child 2240: Starting thread to listen on port 80.
[Tue Nov 02 09:35:36 2010] [error] [client 127.0.0.1] File does not exist: C:/Apache2.2/htdocs/emes

Er sucht irgendwie noch unter C:/Apache2.2/htdocs

Ein mod_jk.log wurde angelegt und darin steht folgendes:
[Tue Nov 02 09:34:55 2010][3176:5340] [info] mod_jk.c (3189): mod_jk/1.2.30 initialized
[Tue Nov 02 09:34:55 2010][3176:5340] [info] mod_jk.c (3189): mod_jk/1.2.30 initialized
[Tue Nov 02 09:34:55 2010][2240:4740] [info] mod_jk.c (3189): mod_jk/1.2.30 initialized
[Tue Nov 02 09:34:55 2010][2240:4740] [info] mod_jk.c (3189): mod_jk/1.2.30 initialized

Irgendwas hab da noch falsch gemacht....
 
Hallo,

ja das war falsch, geht aber auch nicht.
Habe das jetzt so angepasst wie aus dem Beispiel: michael-heiss.at - TomcatBehindApache
Also workers.properties:
#Define 1 real worker using ajp13
worker.list=worker1
#Set properties for worker1 (ajp13)
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009

und httpd.conf:

#------------ Connect APACHE AND TOMCAT -------------------
#Load the connect module
LoadModule jk_module modules/mod_jk.so
# Where to find workers.properties
JkWorkersFile conf/workers.properties
# Where to put jk shared memory -> apache log
JkShmFile logs/mod_jk.shm
# Log directory of the mod
JkLogFile logs/mod_jk.log
# Set the jk log level [debug/error/info]
JkLogLevel info
# Select the timestamp log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
# Send everything for context /javaee to worker named worker1 (ajp13)
JkMount /emes worker1
#-------------End of APACHE and TOMCAT -----------------

Es spielt auch keine Rolle, ob ich JkMount /emes worker1 oder JkMount /emes/* worker1 schreibe!
 

Zurück
Oben