users@glassfish.java.net

Re: docroot of web app / mod_jk

From: <glassfish_at_javadesktop.org>
Date: Sat, 06 Jun 2009 13:14:40 PDT

Thanks a lot for all your replies.

Meanwhile I could put everything in order, and have it up and running like this:

- without additional instances
- without additional ports
- without additional ip addresses
- without additional listeners
- without alias mapping in apache
- without any redirection needed
- every web app has it's own context root
- every domain points to the correct web app:

www.aaa.com -> serves from /web-app-aaa
www.bbb.com -> serves from /web-app-bbb

I could even get it up and running with ssl hosts.

I could do so on Version: v2.1 (9.1.1) (build b60e-fcs)

Please read, what I did:

- I set up the virtual host pointing to standard docroot
- the virtual host is set up at /configuration/server-config/virtual-servers
- I deployed the web app with its own context root.
- after deploment I went to webapplications -> <deployed-app> -> target
- under the target I modified at virtual servers. here I removed the standard server entry and have choosen the virtual host name what should be responsible for this particular web app.

(I use the German version of the admin interface. the translations of the steps may vary from the real ones, but I would be grateful, to provide a screenshot upon request.)

now I can go to: www.aaa.com and it starts automatically mywebapp-aaa or www.bbb.com starts mywebapp-bbb

no need to append the context root, and even the the jsessionid appears in the url.

This is exactly what I wanted to have.

You even benifit from a rapid page speed if you enable precompiling jps. The pages now appear faster than having finished typing in the url! :-)

Thanks and Best regards.

Dave.
[Message sent by forum member 'seagate' (seagate)]

http://forums.java.net/jive/thread.jspa?messageID=349575