tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrice Durosay <Patrice.Duro...@cgm.cnrs-gif.fr>
Subject httpd-tomcat, a difficult cohabitation on port 8O
Date Tue, 29 Nov 2005 16:46:23 GMT

Hello all,

without java nor tomcat experience, I'm now in charge of our web sites.

The first (tomcatweb) has been developped earlier by some one under 
tomcat, and works properly with the tomcat server on port 80 (instead of 
8080, question of authorisations).

The second (phpweb) has been developped recently by someone else in php 
and work well inside our lan with apache on port 8070 via an IP/port 
virtual host.

To be able to see it outside our lan, we defined several domain name 
aliases to the server's IP address and want httpd to be our server on 
port 80 to :
   serve virtual hosts by name (php-mysql)
   allow the connexion to our tomcatweb, and expresso for administrative 
purpose.

Actually, The tomcatweb is not available through httpd. Hope it will be 
possible.  
   
Apache is 2.0.46 from rpm & rpm-dev
tomcat is 5.0.27
I've just installed jk 1.2.15  from sources to replace the not working jk2.

Added in httpd.conf :
LoadModule jk_module  modules/mod_jk.so
<IfModule mod_jk.c>
  JkWorkersfile conf/workers2.properties
  JkLogFile logs/mod_jk.log
  #JkLogLevel info
  JkLogLevel trace
  JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
  JkOptions +ForwardKeySize +ForwardURICompat +ForwardDirectories
  JkRequestLogFormat "%w %V %T"
  JkMount /expresso/* myTomcatWebwrkr
  JkMount /myTomcatWeb/* myTomcatWebwrkr
</IfModule>
...
NameVirtualHost *:80
 <VirtualHost *:80>
     ServerName MyPhpWeb.MyDomain
     DocumentRoot /PathTo/MyPhpWeb
     ErrorLog logs/MyPhpWeb.log
     TransferLog logs/MyPhpWeb_transfer.log
     ServerAdmin mymail@myaddress
 </VirtualHost>


I Tried to define a virtual host for the tomcatweb without success :
It drives to the page source of frame.jsp and do not execute it.
The .../ROOT/ contains both directories for applications expresso & 
MyTomcatWeb.
<VirtualHost *:80>
   ServerName MyTomcatWeb.MyDomain
   DocumentRoot /usr/local/java/tomcat/webapps/ROOT/
   ErrorLog logs/MyTomcatWeb.log
   TransferLog logs/MyTomcatWeb_transfer.log
   ServerAdmin mymail@myaddress
   DirectoryIndex frame.jsp index.jsp index.html
</VirtualHost>


When refresh the page httpd://MyTomcatWeb.MyDomain the mod_jk.log says :
[mar nov 29 16:53:25 2005][25790:26784] [trace] 
map_uri_to_worker::jk_uri_worker_map.c (422): enter
[mar nov 29 16:53:25 2005][25790:26784] [debug] 
map_uri_to_worker::jk_uri_worker_map.c (449): Attempting to map URI '/' 
from 2 maps
[mar nov 29 16:53:25 2005][25790:26784] [debug] 
map_uri_to_worker::jk_uri_worker_map.c (461): Attempting to map context 
URI '/biopuceweb/*'
[mar nov 29 16:53:25 2005][25790:26784] [debug] 
map_uri_to_worker::jk_uri_worker_map.c (461): Attempting to map context 
URI '/expresso/*'
[mar nov 29 16:53:25 2005][25790:26784] [trace] 
map_uri_to_worker::jk_uri_worker_map.c (496): exit
...
... Attempting to map URI '/error/HTTP_NOT_FOUND.html.var' from 2 maps
... Attempting to map URI '/error/contact.html.var' from 2 maps
...
and others for the 2 context uri


The workers2.properties contains only :
workers.tomcat_home=/usr/java/tomcat
workers.java_home=/usr/java
ps=/
worker.list=myTomcatWebwrkr
worker.myTomcatWebwrkr.type=ajp13
worker.myTomcatWebwrkr.host=MyTomcatWeb.MyDomain
worker.myTomcatWebwrkr.port=8009
worker.myTomcatWebwrkr.lbfactor=50
worker.myTomcatWebwrkr.cachesize=10
worker.myTomcatWebwrkr.cache_timeout=600
worker.myTomcatWebwrkr.socket_keepalive=1
worker.myTomcatWebwrkr.socket_timeout=300
# Uri mapping
 [uri:/jkstatus/*]
 group=status:status
# Uri mapping
 [uri:/jsp-examples/*]
# Uri mapping
 [uri:/expresso/*]
# Uri mapping
 [uri:/MyTomcatWeb/*]


On the Tomcat side, in server.xml, server port is 8005,
Connector port 80 (instead of 8080) is commented out,
and also the 8443 redirection port.
The connector port is :
<Server port="8005" shutdown="SHUTDOWN" debug="0">
    <Connector port="8009"
               enableLookups="false" redirectPort="8443" debug="0"
               protocol="AJP/1.3" />


When I start the catalina server (after httpd), the catalina.out shows
things I don't understand :
...
2005-11-29 17:17:52,737 WARN  [main] misc.ConfigManager 
(ConfigManager.java:819) - Job handler for configuration 'postgresDB' 
not enabled (because of the setting in expresso-config.xml).
2005-11-29 17:17:52,741 WARN  [main] misc.ConfigManager 
(ConfigManager.java:819) - Job handler for configuration 
'MyTomcatWebdata' not enabled (because of the setting in 
expresso-config.xml).
...
29 nov. 2005 17:17:55 org.apache.catalina.core.StandardHostDeployer install
INFO: Installation d'une application pour le chemin de contexte 
/jsp-examples depuis l'URL 
file:/usr/local/java/tomcat5027/webapps/jsp-examples
...
29 nov. 2005 17:17:56 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=2/76  
config=/usr/local/java/tomcat/conf/jk2.properties
29 nov. 2005 17:17:56 org.apache.catalina.startup.Catalina start


As I didn't find the conf that calls the jk2.properties, i commented all 
the lines because jk2 is not in use. I dont know if jk needs a 
properties file there.
When I refresh the expresso page, I can get the menus, but the links 
toward the tables give an error 404, which should be consistent with the 
"'postgresDB' not enabled"
When I refresh the MyTomcatWebdata page, I get the sources and no action.

When I neutralises the httpd Listen 80 & virtual hosts and restore 
tomcat as the webserver, I have also the postgres error, but expresso 
and myTomcatWeb work proprely.

So I have a lot of questions :
Should I define a different worker for each application : expresso, 
jsp-examples,myTomcatWeb, ... in workers2.properties and jkmount them in 
httpd.conf ?

Should I define a virtual host for each, and is the DocumentRoot path 
correct?

Did I miss something in the configuration files ?

What can I do to launch my application from Apache ?

After having read lots of documents and wasted a lot of time, I'm now 
sinking and will appreciate some help.
Each Commentary or advice is welcome.


Cordially

Patrice Durosay


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message