tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rathna <gente...@gmail.com>
Subject apache2 tomcat6.0.26 mod_jk
Date Tue, 01 Jun 2010 18:34:28 GMT
Let's say I own two websites.
1) batman.com
2) superman.com

I have two web applications hosted in tomcat6 under webapps.
1) /usr/local/tomcat6/webapps/
batman
2) /usr/local/tomcat6/webapps/superman

I would like to configure apache in such a way that when I type the url
http://www.batman.com the website under /batman should be served. Likewise
if I type the url http://www.superman.com the website under /superman should
be served.

Right now, I can only get it working if I type http://www.batman.com/batmanor
http://www.superman.com/superman.

My settings are as follows:

/etc/apache2/sites-enabled/batman:
<VirtualHost *:80>
    ServerAdmin webmaster@localhost

    ServerName batman.com
    ServerAlias www.batman.com

    JkMount / worker1
    JkMount /* worker1

    ErrorLog /var/log/apache2/error.log
    LogLevel warn
    CustomLog /var/log/apache2/access.log combined
</VirtualHost>

/etc/apache2/sites-enabled/superman:
<VirtualHost *:80>
    ServerAdmin webmaster@localhost

    ServerName superman.com
    ServerAlias www.superman.com

    JkMount / worker1
    JkMount /* worker1

    ErrorLog /var/log/apache2/error.log
    LogLevel warn
    CustomLog /var/log/apache2/access.log combined
</VirtualHost>

/etc/apache2/worker.properties:
# Define worker
worker.list=worker1
# Set properties for worker1
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009

/etc/apache2/apache2.conf:
#Load jk_module
LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so
# workers.properties path
JkWorkersFile /etc/apache2/workers.properties
# JK shared memory path
JkShmFile /var/log/apache2/mod_jk.shm
# JK Log path
JkLogFile /var/log/apache2/mod_jk.log
# JK log level [debug/error/info]
JkLogLevel info
# Log Timestamp format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "


I'm running this on Ubuntu 9.0.4 OS. I'm really stuck. Any help would be
much appreciated. Thank you.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message