glassfish_at_javadesktop.org wrote:
> Hi,
>
> There is nothing wrong with you setting the docroot of your apache configuration to point to the directory under glassfish (i.e. applications/j2ee-modules/myapp). There is nothing says that the two systems can't both access this folder (that's the whole point of fronting with Apache).
>
> If you have only the one application then you can use http://www.my-domain-myapp1.com to access your application (just make sure that the context-root is set to / in application.xml).
>
> ** BUT **, if you have more than one application you want to deploy then you can't do that. Because Glassfish V2.1 (and probably V3 Prelude) do not support virtual hosts properly. This means that you can have as many virtual hosts as you want, but each application has to have a unique context-root (because any application can be accessed from any virtual host, i.e. http://www.host1.com/app1 and http://www.host2.com/app1, both serve up app1 even if you configure them differently in Glassfish). This is a known issue and an enhancement request has been put in to fix this issue.
>
Which one is this? Because it works for me (on v2.1 and prior to this on
v2 UR1). Having four virtual servers I can access one app with a unique
context only on this virtual server (domain). And I have also deployed
four apps with the context root "/" - and these are also only served by
the correct virtual server. Is this bug/RFE still open? And if so, which
bug-id has it?
--
Wolfram Rittmeyer