Hello,
I am trying to setup apache virtual hosts mapped to tomcat contexts using apache
2.0, jk2 and tomcat 5. Everything in the connection apache-jk2-tomcat seems to
work fine, except for the fact it seems I'm not able to configure apache virtual
hosts mapped to particular tomcat contexts.
What I'd like is having virtual hosts such as
wiki.xxx.com
blog.xxx.com
mapped to tomcat contexts such as /wiki and /blog
I have already read a lot of online documentation, tutorials and examples, but
nothing seems to specifically cover this issue. The jk2 documentation specifies
there should be a "context" property that should specify the webapp context we
want to be called for a particular virtual host, but this doesn't seem to work.
More specifically, I have this in my httpd.conf:
<VirtualHost *>
ServerAdmin [EMAIL PROTECTED]
DocumentRoot c:/web/jspwiki
ServerName wiki2.xxx.com
ErrorLog logs/wiki2-error_log
CustomLog logs/wiki2-access_log common
<Location "/">
JkUriSet group lb
JkUriSet context /wiki
</Location>
</VirtualHost>
<VirtualHost *>
ServerAdmin [EMAIL PROTECTED]
DocumentRoot c:/web/jspwiki
ServerName blog2.xxx.com
ErrorLog logs/blog2-error_log
CustomLog logs/blog2-access_log common
<Location "/">
JkUriSet context /roller
</Location>
</VirtualHost>
I've tried various entries in the <Location> tag (putting "worker" and "uri"
properties as well, more or less by hazard because the documentation is not very
clear), but none of them seem to matter: with this configuration, what happens
is simply that if I call wiki2.xxx.com or blog2.xxx.com the normal tomcat root
is served, and if I try to access the subcontexts (i.e.: wiki2.xxx.com/wiki)
everything works normally.
In workers2.properties I have the following:
[logger]
level=INFO
[uriMap:]
info=Maps the requests. Options: debug
debug=1
[workerEnv:]
info=Global server options
timing=1
debug=1
[lb:lb]
info=Default load balancer.
debug=1
[channel.socket:localhost:8009]
info=Ajp13 forwarding over socket
host=localhost
port=8009
debug=1
tomcatId=localhost:8009
group=lb
[status:]
info=Status worker, displays runtime informations
[uri:/jkstatus/*]
info=Display status information and checks the config file for changes.
group=status:
[uri:wiki2.xxx.com/]
info=jspwiki
context=/wiki
group=lb
debug=0
[uri:blog2.xxx.com/]
info=roller weblogger
context=/roller
group=lb
Any idea why this won't work?
Many thanks,
Davide Baroncelli.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]