I'm curious regarding how, for instance Beanstalk and Server Density, create custom domain names (e.g. custom.beanstalkapp.com, custom.serverdensity.com) for every sign-up. I must make a move similar to ensure that clients as well as their staff access the net-application at their very own sub-domain. Each application either uses LDAP or our very own native user storage based on client choice and would share a typical API.

Does each custom domain share exactly the same web application code base?

Using this further let's say I needed to permit a totally custom domain as possible with bit.ly professional. I'd imagine within this situation the client would point the An archive for his or her domain to the web servers therefore we would need to programatically edit our Apache configuration to include a brand new virtual host for your domain?

Within this application the API is designed in Java (using Restlet) using the front-finish designed in GWT. The information layer is built-in MongoDB.

You should use wildcard dns and title based virtual hosts in apache to complete the subdomain bit.

You'll need a web server where one can programatically alter the configuration particularly for that virtual hosts.

This will in all probability mean that you'll want an embeddable server to possess full charge of what continues rather than hacking on the stand-alone server. That's the initial step. Do this first.