java - Multiple Subdomains in Apache / Tomcat with mod_jk -


i trying setup 2 subdomains 2 separate applications running 1 tomcat server , having hard time getting going.

without subdomains able configure 1 virtualhost 2 mount points , able @ applications way ( looks http:// url/confluence ) not optimal.

my set follows:

  • subdomain - youtrack.url.com
  • subdomain - confluence.url.com
  • tomcat7 running 2 war files context paths of /confluence , /youtrack
  • apache 2 running mod_jk against tomcat instance

here httpd.conf setup

jkworkersfile /etc/httpd/conf/workers.properties jkloglevel info  namevirtualhost *:80  <virtualhost *:80>     servername youtrack.url.com     serveralias www.youtrack.url.com     jkmount /youtrack* tomcat     documentroot /var/www/html/youtrack </virtualhost>  <virtualhost *:80>     servername confluence.url.com     serveralias www.confluence.url.com     jkmount /confluence* tomcat     documentroot /var/www/html/confluence </virtualhost> 

here workers.properties

worker.list=tomcat  worker.tomcat.host=localhost worker.tomcat.port=8009 worker.tomcat.type=ajp13 

what appears happening hit documentroot of each subdomain when remove documentroot never makes on tomcat web app.

looking help, thanks.

updated - here mod_jk log

[mon aug 19 15:14:37.011 2013] [26577:139706593232864] [debug] map_uri_to_worker_ext::jk_uri_worker_map.c (1131): attempting map uri '/favicon.ico' 2 maps [mon aug 19 15:14:37.011 2013] [26577:139706593232864] [debug] find_match::jk_uri_worker_map.c (945): attempting map context uri '/confluence/=confluence' source 'jkmount' [mon aug 19 15:14:37.011 2013] [26577:139706593232864] [debug] find_match::jk_uri_worker_map.c (945): attempting map context uri '/confluence=confluence' source 'jkmount' [mon aug 19 15:14:37.011 2013] [26577:139706593232864] [debug] jk_translate::mod_jk.c (3723): no match /favicon.ico found [mon aug 19 15:14:37.011 2013] [26577:139706593232864] [debug] map_uri_to_worker_ext::jk_uri_worker_map.c (1131): attempting map uri '/favicon.ico' 2 maps [mon aug 19 15:14:37.011 2013] [26577:139706593232864] [debug] find_match::jk_uri_worker_map.c (945): attempting map context uri '/confluence/=confluence' source 'jkmount' [mon aug 19 15:14:37.011 2013] [26577:139706593232864] [debug] find_match::jk_uri_worker_map.c (945): attempting map context uri '/confluence=confluence' source 'jkmount' [mon aug 19 15:14:37.011 2013] [26577:139706593232864] [debug] jk_map_to_storage::mod_jk.c (3798): no match /favicon.ico found 

add apache web server config:

<virtualhost youtrack.url.com:80>     servername youtrack.url.com     jkmount / tomcat     jkmount /* tomcat </virtualhost>  <virtualhost confluence.url.com:80>     servername confluence.url.com     jkmount / tomcat     jkmount /* tomcat </virtualhost> 

and tomcats server.xml:

for single webapps directory (applications deployed domain names, see "docbase"):

<host name="youtrack.url.com" appbase="webapps">     <context path="" docbase="youtrack"/> </host>  <host name="confluence.url.com" appbase="webapps">     <context path="" docbase="confluence"/> </host> 

for separate webapps directories (applications deployed "root"):

<host name="youtrack.url.com" appbase="absolute_path\youtrack-webapps" autodeploy="true" unpackwars="true" /> <host name="confluence.url.com" appbase="absolute_path\confluence-webapps" autodeploy="true" unpackwars="true" /> 

Comments

Popular posts from this blog

java - JavaFX 2 slider labelFormatter not being used -

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -