Automated Domain Aliases? Is this possible?

Discussion in 'Site & Server Administration' started by elklabone, Dec 23, 2009.

  1. #1
    We operate in the 'replicated hosting' environment... we setup mini-sites for clients that run on a 'username' type of setup:

    Example:

    site.com/joeschmo
    site.com/jsmith
    site.com/susie

    They frequently want to use their own domain with their site, so we tell them to get a domain and forward it to their site, however this isn't ideal.

    We'd love to be able to have them go register a domain, set the nameservers to our dedicated server, set something up in their replicated site control panel and then have their site start working with their own domain name all without our interaction.

    Our dedicated server is Debian/Plesk

    Our site is coded in PHP/Symfony/MySQL

    We have several hundred clients, so something automated is essential.

    Thanks again!

    -Mark
     
    elklabone, Dec 23, 2009 IP
  2. necroz

    necroz Peon

    Messages:
    25
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You can't serve random domains without your interaction: your webserver must know which local script to do the URL rewrite to. But you can write rewrite rule to serve domains like this:
    www.joeschmo.com -> site.com/joeschmo.com
    www.jsmith.com -> site.com/jsmith.com
    www.susie.com -> site.com/susie.com
    That would require that your client username is the same as client global domain name.
     
    necroz, Dec 24, 2009 IP
  3. elklabone

    elklabone Peon

    Messages:
    242
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Seems to me when you add an alisas it's just writing to a config file someplace... shouldn't it be possible to automate this?

    When you create a low-cost hosting account, I doubt someone is manually rewriting config files, but I could be wrong.

    How does a web host edit their virtual hosts file?
     
    elklabone, Dec 24, 2009 IP
  4. necroz

    necroz Peon

    Messages:
    25
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Web hosts have their configurations in SQL database and scripts that manage it. It's usually a feature of control panel. Doesn't Plesk have this ? It should. But it's not "without interaction", as you said: it will still require you to log in to control panel and enter your client's domain name.
     
    necroz, Dec 24, 2009 IP
  5. elklabone

    elklabone Peon

    Messages:
    242
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Great point... I really don't know that much about plesk, but this is definitely worth looking into.

    My plan was to have the clients enter in their domain information during setup, and then automate the alias and the redirect with scripts.

    Thanks for the ideas!
     
    elklabone, Dec 26, 2009 IP