Hi,
I want to serve different domains with different webapps on a GlassFish. I have a ready and working mod_jk config in apache2 what passes the requests to the Glassfish.
My question:
Deploying a war from netbeans to the GlassFish goes to ${com.sun.aas.instanceRoot}/applications/j2ee-modules/myapp1
I want to use this by just typing the fqdn:
http://www.my-domain-myapp1.com, the glassfish should automatically point to (...)/applications/j2ee-modules/myapp to serve the files from there.
I can't do so. I have to type the following url:
http://www.my-domain-myapp1.com/myapp1
If I type in:
http://www.my-domain-myapp1.com it always points me to /domains/domain1/docroot no matter what I have defined as docroot.
Even if I set ${com.sun.aas.instanceRoot}/applications/j2ee-modules/myapp1 as a docroot for a virtual host, it is not recogniced / considered.
This is something unwanted, and I would like to ask, how to set up GlassFish V2.1, that the myapp1 is started using a specific url (determination of war to use based on the host header).
I have spent now a few days to get this issue solved but couldn't find a solution yet.
This is my apache mod_jk VirtualHost Entry:
<VirtualHost *:80>
AccessFileName .permissions
ServerName www.my-domain-myapp1.com
ServerAdmin support@((...)
DocumentRoot /web/www.my-domain-myapp1.com
JKMount /* worker1
JKMount /*.jsp worker1
</VirtualHost>
I have to define a DocumentRoot in apache, and it must not be empty as apache won't start. As well I can not point the apache DocumentRoot to ${com.sun.aas.instanceRoot}/applications/j2ee-modules/myapp1 as both servers (apache + glassfish) may not serve from the same directory.
Thanks for any help in advance, it is much appreciated.
Regards,
Dave.
[Message sent by forum member 'seagate' (seagate)]
http://forums.java.net/jive/thread.jspa?messageID=349369