How do I create a subdomain?

Discussion in 'Installation/Configuration' started by torqhost, Sep 1, 2007.

  1. torqhost

    torqhost New Member

    How do I create a subdomain? I am guessing it's the co domain feature, but where do I put the files, that correspond to the subdomain? I don't want to do redirection to folders, I just need it to display a subdomain properly.

    Thanks
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Just create a new website. If your subdomain is sub.domain.com, then create a website with:

    hostname: sub
    domain: domain.com

    Every client van have more then one website.
     
  3. torqhost

    torqhost New Member

    But how can a client create a subdomain? I think only administrator or reseller can create new sites, but I think resellers will not want to create evey subdomain for customers manually.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Create a reseller account for your client, if you want that the client is able to create new websites.

    Co-domains are subdomains and they can be created by the client himself. But if you want a own webspace for a subdomain, it is a website and not a co-domain and websites can only be created by resellers and the admin.
     
  5. torqhost

    torqhost New Member

    Ok, I understand what you mean. But I don't need a subdomain to be a separate website, the settings / limits should be as for the parent website, I just need it to point it to a directory inside the website directory, so if I say, for example wiki.somedomain, I would like wiki to point to wiki directory inside the directory for somedomain. Co-domain however can only forward the url from wiki.somedomain to somedomain/wiki. So there is no way to just make it point to a directory and keeping parent settings, but a website needs to be created.
    An I correct in my understanding now?

    Thanks for your help.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

  7. ataman79

    ataman79 New Member

    Ok I create a new website just like you said. My domain is www.domain.com and i deicide to create subdomain test.domain.com, but now when I type the command : ping test.domain.com - it tells me that could not find host test.libra-ag.com

    Where is the problem ? :confused:
     
  8. falko

    falko Super Moderator ISPConfig Developer

    Please check if the DNS record for test.domain.com is correct. You can check that like this:
    Code:
    dig test.domain.com
     
  9. make-fun

    make-fun Member

    Hi Till,
    I've been reading all the info on subdomains — including people wondering if it could be implemented in ISPConfig to have "permanent" subdomains without adding the "RewriteEngine Opton" manually, using this option Co/sub-domains without rewritten

    Here's what I was planning on doing about it myself…
    I was going to simply add a prefix to the name of the "subdomain" as I insert it into the HOST inputfield.
    Like this:
    Host: perma_mysubdomain
    Domain: example.com

    Then add a little switch with something like
    PHP:
    if(substr($domain["domain_weiterleitung"],0,6) == "perma_"){
    // remove the prefix
    // then change the $rewrite_rule by removing the [R]
    $rewrite_rule .= "\nRewriteRule   ^/(.*)$  http://".$servername.$domain["domain_weiterleitung"]."$1 ";
    }
    in /root/ispconfig/scripts/lib/config.lib.php around ~ line 1374

    So there'd be no big changes within the DB or so, the "Prefix-Option" could just be added as a simple text hint next to the input field "Host:"
    Or, to make it nice and simple… at some time in future, be done with a set of radio buttons or what ever…

    Any thoughts on that Till — I've not done it jet, it was rather some brainstorming so far

    Cheers
     
    Last edited: Feb 23, 2008

Share This Page