Subdomain Displays Root Domain

Discussion in 'General' started by GoremanX, Jan 15, 2011.

  1. GoremanX

    GoremanX New Member

    Running ISPConfig 3.0.3.2 on Ubuntu 10.04 with all the latest OS updates.

    I created a website (mainsite.com) with auto-subdomain set to *
    This works fine and can be accessed through any means (www.mainsite.com, test.mainsite.com, mainsite.com, etc)

    I created a website (dev.mainsite.com) with auto-subdomain set to "none". Now when I type dev.mainsite.com in my browser, this second site is displayed, as expected.

    I created a website (j16.mainsite.com) configured exactly the same way as dev.mainsite.com. Now when I type j16.mainsite.com in my browser, I get the root website (mainsite.com) instead of the one that should be at j16.mainsite.com.

    If I change the auto-subdomain for mainsite.com to "www." or "none", both j16.mainsite.com and dev.mainsite.com function as expected.

    If I set the auto-subdomain for mainsite.com to *, then dev.mainsite.com functions as expected but j16.mainsite.com does not.

    Is this normal or a bug? If it's normal, can someone explain why it's happening?

    Thanks,
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Can you post the mainsite.com, dev.mainsite.com, and j16.mainsite.com vhost configurations?
     
  3. GoremanX

    GoremanX New Member

  4. till

    till Super Moderator Staff Member ISPConfig Developer

    This is normal for apache webservers as the * wildcard catches all subdomains, so you will never see a different website for a subdomain if you use a * wildcard in a site that is listed before the subdomain site. The Ü wildcard can only be used if no subdomains fr that domain exist as separate websites.
     
  5. GoremanX

    GoremanX New Member

    But that's not how it behaved. the dev subdomain did load up the website at that subdomain, even when the main auto-subdomain was set to *.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    You can not use * when you have more then one subdomain for a website. Please go trough all subdomains and sites that use the same main domain and make sure that none of them has * selected as auto subdomain. The alternative is that you set * for one website and delete all other subdomains, but I guess thats not what you want.
     
  7. 1ng0

    1ng0 New Member

    Hi, I'm reviving this thread because I ran into a similar or the same problem recently.

    Is it possible that evaluation of subdomains depends on the alphanumerical order in the 'sites-enabled' directory of apache? Does the order play a role in which the vhost files are concatenated or parsed?

    This seems not directly valid for the above problem (because d and j are before m). But the effect I observed is this:

    On a site with 2nd-lvl domain starting with letter w, auto-subdomain is set to *. Additionally, there exist multiple sites on different subdomains (<3rd-lvl>.w___.<tld>) All of them work as desired.

    Now, I created a site with a 2nd-lvl domain starting with letter i and auto-subdomain set to *. In this case, additional sites with 3rd-lvl domain names based on the i domain do not work if they start with a letter greater than i Those 3rd-lvl subdomains starting with a letter lower than i do work (tested).

    If my assumption is correct, this is a problem with apache and not ispconfig. How does ispconfig en/disable a site for apache, does it use the 'a2ensite' commands?

    Using ispconfig 3.0.3.3 and apache 2.2.14
    Perhaps, this is relevant:
    http://httpd.apache.org/docs/2.2/vhosts/details.html#observations

    Thanks and kind regards
     

Share This Page