Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / January 2008

Tip: Looking for answers? Try searching our database.

create subdomains on the fly in a Java web app

Thread view: 
Dundonald - 31 Dec 2007 16:57 GMT
Has anyone developed a web app that creates subdomain names on the
fly?  For example a users of our web service can create a subdomain on
our main domain name, such as customersusername.ourdomainname.com?

I'm just wondering how this could be done.

Thanks
Greg R. Broderick - 31 Dec 2007 22:44 GMT
Dundonald <mark.dundon@gmail.com> wrote in news:70e50bf7-ba1d-4473-853a-
6e894ab907e3@e23g2000prf.googlegroups.com:

> Has anyone developed a web app that creates subdomain names on the
> fly?  For example a users of our web service can create a subdomain on
> our main domain name, such as customersusername.ourdomainname.com?
>
> I'm just wondering how this could be done.

c.f. the O'Reilly "cricket" book on DNS for the gory technical details,
<http://www.oreilly.com/catalog/dns5/>.

With the reference implementation of DNS (BIND), you would need to:

1.  If the 'subdomain' points at a single host, modify the zone file for the
master domain, by adding a new A or A6 (if you're using IPv6) record for the
new subdomain.  Modify the zone file for the reverse zone to point the host's
IP address at the newly-created host name.

or

1.  If the subdomain may contain more than one host, create a new zone file
for the new subdomain.  This can probably be templated, using a tool such as
velocity.

2.  Modify the zone serial number in the SOA record of the second-level
domain.  This tells the DNS server that the zone data has changed.

3.  If the subdomain required the creation of a new zone file for the
subdomain, modify the file /etc/named.conf to point the new zone at the new
zone files.

4.  Forcibly restart the name server.

Much of this would be considerably easier if the name server is itself open-
source and implemented in java, but in any case, a thorough grounding in the
domain naming system will be essential if you wish to accomplish this task.

Cheers!
GRB

Signature

---------------------------------------------------------------------
Greg R. Broderick                  usenet200705@blackholio.dyndns.org

A. Top posters.
Q. What is the most annoying thing on Usenet?
---------------------------------------------------------------------

Dundonald - 01 Jan 2008 01:12 GMT
> Dundonald <mark.dun...@gmail.com> wrote in news:70e50bf7-ba1d-4473-853a-
> 6e894ab90...@e23g2000prf.googlegroups.com:
[quoted text clipped - 44 lines]
> Q. What is the most annoying thing on Usenet?
> ---------------------------------------------------------------------

Hey Greg thanks for your post and the info.  I'm currently
transferring my service to a new host so I'm going to take a look at
the above and how I can programmatically automate this process, if at
all possible.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.