Hello,
I have a mod_jk problem related to multiple hosts on Apache and Tomcat
My setup is
Centos 5.3 + Apache HTTPD 2.2.3 + Tomcat 5
httpd.conf contains (Just before section 3) Basic mod_jk directives.
At the end it contains two virtual hosts:
(all sections are placed in proper files, but I have grouped them to make it
easier to read)
<VirtualHost *:80>
ServerName share.domain.com
DocumentRoot /var/lib/tomcat5/ShareApp/share/
Alias / "/var/lib/tomcat5/ShareApp/share"
JkMount /* share_wrk
Options FollowSymLinks
</VirtualHost>
Worker file defined:
worker.list=share_wrk
worker.share_wrk.port=8009
worker.share_wrk.host=share.domain.com
worker.share_wrk.type=ajp13
worker.share_wrk.lbfactor=1
Tomcat host:
<Host name="share.tessel.pl" debug="0"
appBase="/var/lib/tomcat5/ShareApp" unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Context path="" docBase="/var/lib/tomcat5/ShareApp/share"/>
<Alias>share.domain.com</Alias>
</Host>
-------------------------------------------------------------------------------------
<VirtualHost *:80>
ServerName alfresco.domain.com
DocumentRoot /var/lib/tomcat5/webapps/alfresco
Alias /alfresco "/var/lib/tomcat5/webapps/alfresco/"
JkMount /alfresco/* alfresco_wrk
Options FollowSymLinks
</VirtualHost>
Worker file:
worker.list=alfresco_wrk
worker.alfresco_wrk.port=8009
worker.alfresco_wrk.host=localhost
worker.alfresco_wrk.type=ajp13
worker.alfresco_wrk.lbfactor=1
Tomcat Host
<Host name="localhost" debug="0" appBase="webapps" unpackWARs="true"
autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Context path="" docBase="/var/lib/tomcat5/webapps"/>
<Alias>alfresco.domain.com</Alias>
</Host>
---------------------------------------------
Problem description:
Share site has dedicated host in Tomcat and is linked to dedicated host in
Apache - it works perfectly.
By typing address like share.domain.com I get the proper index document
processed by Tomcat (from the root of the app: /index.jsp)
Alfresco site on the other hand is located in the Tomcat Localhost subdirectory
/alfresco (webapps/alfresco/index.jsp)
When I use this config: JkMount /* alfresco_wrk
I can access this site by typing alfresco.domain.com/alfresco but that is not
what I need :( (I want direct access without /alfresco)
So when I change config to point directly into alfresco root:
JkMount /alfresco/* alfresco_wrk
And navigate to alfresco.domain.com I get unprocessed JSP file (displayed as
text) so it looks like it was not passed to Tomcat?
(But I ended in a proper place, because index.html is displayed properly by
Apache itself)
I can’t move alfresco to separate site as I need acees to it locally via
localhost:8080/alfresco address.
I would greatly appretiate any suggestions!
Thank you!
Best regards,
Mike
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]