This took me a couple days of going through the message archives and lots 
of experimentation to figure it out.  I hope I can spare you a similar fate :)

As far as I could make out, jboss doesn't support virtual hosts and there 
is no way to do this in application.xml.  I could be wrong about both, but 
could find nothing in the docs or by experimentation to support virtual 
hosts in either.  However, if you use apache, there is a work 
around.  Let's say you have a plain context of '/mycontext' that would 
normally be accessed as http://localhost:8080/mycontext.  You would add the 
following inside your apache virtual host:

    ProxyRequests on
    ProxyPass /mycontext/ http://localhost:8080/mycontext/
    ProxyPassReverse /mycontext/ http://localhost:8080/mycontext/

I think you also have to add the following if you want index.jsp or 
index.html served correctly from 'mycontext':

    ProxyPass /mycontext http://localhost:8080/mycontext

The only difference being the absence of the trailing slash on 
'/mycontext'.  I haven't finished experimenting with this part yet :)

If you don't use apache then I'm not sure how to do this other than hard 
coding the actual path to the tmp ear deployment directory.  You would do 
this inside of your tomcat virtual host.  I.e:

<host name="www.yourhost.it">
    <context path="/mycontext" 
docBase="/usr/local/jboss/tmp/deploy/Default/mycontext.ear/web1001" />
</host>

I don't know how safe this is, but it looked ugly enough to me that I went 
the apache route.  Let me know what works for you or if you can improve 
upon any of these ideas.

- Todd Chaffee
[EMAIL PROTECTED]


At 11:41 AM 04/23/01 -0600, you wrote:
>Hi,
>
>I'm using Tomcat+jBoss and deploying an EAR file. Everything seems ok, 
>except I'm confused about how to turn this into a Tomcat "virtual host" 
>instead of just a plain "context". There doesn't appear to be a way to 
>specify virtual hosting parameters in application.xml. Is this possible?
>
>Thanks,
>
>Bryan
>
>
>
>_______________________________________________
>JBoss-user mailing list
>[EMAIL PROTECTED]
>http://lists.sourceforge.net/lists/listinfo/jboss-user


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to