I'm not sure I'm configuring things quite correctly, because it seems to
me I should be able to do this with one less token...
Apache 2
TC 4.1.24
JK
My workers.properties:
worker.list=tomcat1
worker.tomcat1.port=11009
worker.tomcat1.host=localhost
worker.tomcat1.type=ajp13
I define an Apache Virtual Host in httpd.conf:
<VirtualHost xxx.xxx.xxx.xxx>
JKMount /ATM tomcat1
JKMount /ATM/* tomcat1
DocumentRoot /home/webhome/atm/htdocs/
ServerName www.foo.com
ServerAlias foo.com
ErrorLog /var/log/atm/error_log
CustomLog /var/log/atm/access_log combined
</VirtualHost>
And in Tomcat server.xml:
(inside the localhost 'host' element)
<Context path="/ATM"
docBase="/home/webhome/atm/"
defaultSessionTimeOut="60"
reloadable="true" >
</Context>
So now to access regular static pages with apache, I just say:
http://www.foo.com/xyz.html
http://www.foo.com/pages/morepages/foo.html
And to do servlet/jsp stuff:
http://www.foo.com/ATM/servletFoo
http://www.foo.com/ATM/foo.jsp
http://www.foo.com/ATM/administer/admin.jsp
This works fairly well, I suppose, but what about sites where MOST
content is jsp/servlet based?
I'd like my URLS to not require the /ATM token.
So then I thought to do this (in apache):
<VirtualHost xxx.xxx.xxx.xxx>
JKMount /*.jsp tomcat1
JKMount /*/*.jsp tomcat1
JKMount /servletFoo tomcat1
DocumentRoot /home/webhome/atm/htdocs/
ServerName www.foo.com
ServerAlias foo.com
ErrorLog /var/log/atm/error_log
CustomLog /var/log/atm/access_log combined
</VirtualHost>
But.... how do I match up the requests from apache's virtual host
www.foo.com to the /ATM context in Tomcat? Am I looking at creating a
new <Host> in Tomcat for each <VirtualHost> in apache?
And then the default webapp for each of my TC Hosts would be the /ATM
application?
Thanks for any pointers.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]