|
|
||||||
|
#1
|
|
|
|
|
Hello
Someone has managed to configure the Apache Virtual Host from Tomcat applications, or better, to ask an url like http://application.something.com, configured as Virtual Host, through Apace that actually send to the client the folder $CATALINA_HOME/webapps/application? I've made some test but without success and the documentation on the web is not really clear, depending a lot from the particular configurations. The connection Apache/Tomcat has already been made, and functions correctly (using the mod_jk.so connector) the configuration is: Fedora Core 4 Apache 2 JDK 1.5.6 Tomcat 5.5.12 Connector mod_jk.so Thank you in advance Fede |
|
|
|
#2
|
|
|
|
|
hello federico,
I've managed to make it work, but really I don't undestand perfectly how... so my solution is the following, you'll find some strange configs... assuming that the java app is $CATALINA_HOME/webapps/foo in httpd.conf I have 2 different virtual hosts, you'll see that both are working in the same way despite of different configs... <VirtualHost *:80> JkMount /* ajp13 ServerName www.mydom1.it DocumentRoot "/usr/java/apache-tomcat/webapps" </VirtualHost> <VirtualHost *:80> ServerName www.mydom2.it DocumentRoot "/usr/java/apache-tomcat/webapps" LogLevel warn HostNameLookups off ServerSignature email DirectoryIndex index.jsp index.html JkMount /* ajp13 JkMount /foo ajp13 JkMount /foo/* ajp13 </VirtualHost> then my server.xml has 2 virtual hosts <Host appBase="webapps" name="www.mydom1.it"> <Context path="" docBase="foo"> <ResourceLink global="jdbc/foo" name="jdbc/foo" type="javax.sql.DataSource"/> </Context> </Host> <Host appBase="webapps" name="www.mydom2.it"> <Context path="" docBase="foo"> <ResourceLink global="jdbc/foo" name="jdbc/foo" type="javax.sql.DataSource"/> </Context> I have also a context.xml in META-INF dir in the webapp itself, with the following <Context path="/foo"> <ResourceLink global="jdbc/foo" name="jdbc/foo" type="javax.sql.DataSource"/> </Context> so, theoretically I should not use the context in server.xml, but didn't manage to make it work otherwise... hth, tom |
|
|
| Similar Threads | |
| Tomcat default context for virtual host jsguru72 wrote: > According to the documentation for the Tomcat 6 <Context> element, > ----- > If you specify a context path of an empty string (""), you are > defining the... |
|
| Virtual hosting with apache-httpd and apache-tomcat Hi, I was just reading the VirtualHost documentation on the net, so a question popped up in my mind. I apologise if im posting on the wrong but I needed to clarify my doubts... |
|
| Tomcat Virtual Host Setup I am currently running Tomcat 5.5 and IIS6. Up until recently I had only one site that was using servlets. But as of this week I have acquired a new site that will also be... |
|
| TOMCAT + JK + VIRTUAL HOST Hi all ! i'm trying to create a kind of virtual hosting with tomcat: my config: 1- my domain= [..] 2- my webapp= /mywebapp 3-... |
|
| apache virtual host Hello, I've got an rh9 machine that i'd like to do some web development on. I've got httpd.conf configured and one domain is working. I've then added a vhost.conf in... |
|
|
All times are GMT. The time now is 11:16 AM. | Privacy Policy
|