Let's suppose we give to different users(clients) different domains (one domain for one user) in our glassfish application server for their work. This glassfish works in centos 6 server. Every user has his user folder in /home (/home/user1, /home/user2). Glassfish is installed in /usr/glassfish..... and runs as "glassfish" linux user.
And every user(client) wants to have an alternate docroot(s). Here's is the problem. Every user has access only to his home folder. So it's the place where he wants to have alternate docroot(s) to keep his data. In order for glassfish to get users' alternate docroots we open users' folders (/home/user1, /home/user2) for glassfish. But now, every user can deploy his application and get another user's alternate docroot. Because it's the user sets alternate docroot folder not the admin.
Here is the big difference - in apache it's the administrator who sets webserver folders for reading.
So either my vision is wrong or how can it be fixed?
[EDITED] Here I am talking about one linux server with one IP and one glassfish application server in that linux server. To supply services to our clients we don't install different glassfish servers we give them different domains in the same glassfish server as I see it's the best strategy.