Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > create subdomains on the fly in a Java web app

Reply
Thread Tools

create subdomains on the fly in a Java web app

 
 
Dundonald
Guest
Posts: n/a
 
      12-31-2007
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
 
Reply With Quote
 
 
 
 
Greg R. Broderick
Guest
Posts: n/a
 
      12-31-2007
Dundonald <(E-Mail Removed)> wrote in news:70e50bf7-ba1d-4473-853a-
http://www.velocityreviews.com/forums/(E-Mail Removed):

> 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


--
---------------------------------------------------------------------
Greg R. Broderick (E-Mail Removed)

A. Top posters.
Q. What is the most annoying thing on Usenet?
---------------------------------------------------------------------
 
Reply With Quote
 
 
 
 
Dundonald
Guest
Posts: n/a
 
      01-01-2008
On 31 Dec 2007, 22:44, "Greg R. Broderick"
<(E-Mail Removed)> wrote:
> Dundonald <(E-Mail Removed)> wrote in news:70e50bf7-ba1d-4473-853a-
> (E-Mail Removed):
>
> > 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
>
> --
> ---------------------------------------------------------------------
> Greg R. Broderick (E-Mail Removed)
>
> A. Top posters.
> 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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create Subdomains using JBoss bhavesh.shah Java 0 08-19-2009 10:09 AM
How to Create alias for subdomains or domains vravi_karani Software 0 01-10-2007 03:45 AM
Installing a ASP.NET app on a server with subdomains klj_mcsd@hotmail.com ASP .Net 0 12-07-2004 04:41 PM
To Fly or not to fly? Should I move from Mozilla 1.5 to T-bird andF-bird? Daniel Steinberg Firefox 7 11-06-2003 11:31 AM
To Fly or not to fly? Should I move from Mozilla 1.5 to T-bird andF-bird? Daniel Steinberg Firefox 5 11-05-2003 06:23 AM



Advertisments