create subdomains on the fly in a Java web app

Discussion in 'Java' started by Dundonald, Dec 31, 2007.

  1. Dundonald

    Dundonald Guest

    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
    Dundonald, Dec 31, 2007
    #1
    1. Advertising

  2. Dundonald <> wrote in news:70e50bf7-ba1d-4473-853a-
    :

    > 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

    A. Top posters.
    Q. What is the most annoying thing on Usenet?
    ---------------------------------------------------------------------
    Greg R. Broderick, Dec 31, 2007
    #2
    1. Advertising

  3. Dundonald

    Dundonald Guest

    On 31 Dec 2007, 22:44, "Greg R. Broderick"
    <> wrote:
    > Dundonald <> wrote in news:70e50bf7-ba1d-4473-853a-
    > :
    >
    > > 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
    >
    > 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.
    Dundonald, Jan 1, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brian Henry

    subdomains pulling in like a query string

    Brian Henry, Jan 2, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    432
    Brian Henry
    Jan 2, 2004
  2. Replies:
    0
    Views:
    338
  3. Replies:
    1
    Views:
    304
    Alexey Smirnov
    Aug 3, 2007
  4. bhavesh.shah

    Create Subdomains using JBoss

    bhavesh.shah, Aug 19, 2009, in forum: Java
    Replies:
    0
    Views:
    765
    bhavesh.shah
    Aug 19, 2009
  5. Brian

    Fly outmenu on the fly

    Brian, Apr 8, 2005, in forum: Javascript
    Replies:
    0
    Views:
    93
    Brian
    Apr 8, 2005
Loading...

Share This Page