How Subdomain works (for documentation)

Discussion in 'Developers' Forum' started by moglia, Aug 19, 2009.

  1. moglia

    moglia New Member

    :confused: I will starts produce of end user documentation anyone can explain how subdomain works im looking at apache alias points subdomain for the same document root of main site.

    REDIRECT TYPE - No Redirect - No Flag - R - L - R,L

    Active - Y

    I need explanations how REDIRECT TYPE works.
    it´s possible create a independent virtualhost for subdomain?
    (see workarround)

    How subdomain can use another document root.

    domain inclusion creates folders: cgi-bin log ssl tmp web

    subdomain can use a folder like: subdomain name?

    at the same level of web (document root)

    cgi-bin log ssl tmp web subdomain

    The main question is can specify another document root for subdomain?

    If not possible specify a subdomain document root i no see any diferences between server alias and subdomain.

    i think alias can redirect one domain to another using virtual redirect. one domain to another.

    My workarround i created subdomain as independent website.

    My idea is create subdomain with another document root with the same virtual hosting settings. share setting (main domain and subdomain).
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    This is no workaround, it is the intended way of doing it. If you want a website, create a website. It does not matter for a website if a domain is or

    The difference is very easy. An alias domain can be any domain while a subdomain can just be a subdomain. This is a often requested feature and separation from hosters as many of them allow free subdomains but not free alias domains.
  3. trondhuso

    trondhuso New Member

    To make it even more obvious:
    With an alias you can do this:
    main domain:
    alias: (will point to
    alias: (will point to
    alias: (will point to

    To till:
    What people are reacting to is how subdomains are created.
    (probably a typical one):
    The way ISP Config 3 wants us to do this by using the sub-domain menu, it will actually be the same as:
    Which sometimes is OK, unless you would like to have a subdomain like where you want to test your application with a different setting.
    In Plesk they do it like this:
    And the information regarding the subdomain is found in the vhost-file for the domain.

    You should probably ask users how they implement sub domains. if it is the eq then do no changes.
    If it is that people go and create a new website as, then I would consider changing the way ISP Config handles sub domains.
    I for one support the latter as I am often testing out client websites in a sub domain ( before putting them into production (
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    There is absolutely no need to change the way ispconfig handles subdomains as you just created the subdomain the wrong way. If you like to have a separate directory for a subdomain, you simply click on new website, enter into the domain field and click on save.

    If you want to test a website before you put it in production, you just click on new website, enter into the domain field and click on save. If the site shall go live, you edit the website settings and change to abd click on save. Thats all.
  5. we_are_borg

    we_are_borg New Member

    Till if i make a subdomain as a new website i will get the desired effect namely domain.tld and subdomains.domain.tld all with different logins and pass as a bonus. But would this system not break Ajax requests or will Ajax see it as one domain even its split up.
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    I guess the way a subdomain gets implemented in apache has no influence on ajax, as the client does not know if a subdomain is redirected by a rewrite rule or if its a separate vhost.
  7. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    A question regarding this "subdomains" thing has just come up...

    The situation is as follows:
    Clients have 1 Domain and they shall NOT be able to add further domains like to their ispc account - so I have to limit the web-domain thing to 1.
    BUT: The clients shall be able to add subdomains like with separate login data and root path.
    This is not possible with the Subdomain function of ispc and as the website limit is set to 1 - not possible with the add website function either.
    If I raise the website limit to 5 to allow such subdomains - users could add external domains to their account.

    Is there any solution for this?
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    In SVN you find a domain module which allos to restrict the domains for websites by the admin user.

Share This Page