DNS problem with www.

Discussion in 'Installation/Configuration' started by Claymenia, May 29, 2010.

  1. Claymenia

    Claymenia New Member


    I've a little problem with my ispconfig 3 hosting. I've 2 domains for the moment and they work, but without www.

    If i use mydomain.com => no problem i've my website

    If i use www.mydomain.com => i've one page with "It's work !"

    And that for the both domains... i tried to add a DNS zone with www. but no change !

    Someone have a suggestion ?

    thank by advance
  2. edi00

    edi00 Member

    If you change DNS it may take up to 48 hours before the changes will kick in. Use ping to see if DNS is functional at http://network-tools.com/

    However, it may not be DNS problem. Check if "ServerAlias" is set to *.mydomain.com or list ServerAlias mydomain.com, www.mydomain.com

    The ISPConfig3 has illogical feature allowing user to set Auto-Subdomain = "none" which will remove the "ServerAlias" directive altogether which should not happen if you have more than one site installed.

    It is the "ServerAlias" which will determine which <VirtualHost *:80> will be served since they have same IP address.
    Last edited: May 29, 2010
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    Might be illogical for you but not for others, as this functions does exactly what it says. If you set it to none, then of course no server alias directive gets added. Thats what the word none means. The auto subdomain feature is just for wildcard subdomains or a standard subdomain like www. For all other subdomains, you simply add a subdomain or aliasdomain.
  4. edi00

    edi00 Member

    That is why I call it illogical till, because you can't give choice to your users which is illegal.

    Every host in the "VirtualHost" environment with a single IP address must have "ServerAlias" directive. Otherwise you are creating lot of confusion for the newbies.

    The purpose of a control panel is to make things simple and transparent to user.
    I am sure that it is all clear to you but it took me 1 week to discover this problem.
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Why shall it be illegal? I use it on a lot of my sites with setting none. Works perfectly.
  6. edi00

    edi00 Member

    Sure, and how many sites you have?.... one?.
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    A few hundred.
  8. edi00

    edi00 Member

    Interesting..... my did not worked with two. The first was shadowing the second.
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    So you should really consider to just ask a question if you have a problem with your site or setup instead of complaining thats its illogical ;)

    Apache is showing the first website if there is no matching domain in the apache configuration.


    If you create a website with domain: domain.tld, then you will be able to access thsi site in the browser when you enter http://domain.tld in the web browser. If you enter www.domain.tld in the browser, you will not get this site of course, as www.domain.tld is not listed in the setup. You then have several options:

    a) select auto subdomain "www" in the site settings.
    b) add a subdomain "www" for this site.
    c) add a aliasdomain www.domain.tld to this site.
    d) select * as auto subdomain. But this will match all subdomains and redirect them to the site, so this setting is only a good choice if you e.g. run a cms system like wordpress MU, where users can get their custom subdomains and use this in conjuction with a wildcard DNS record.

    Another example, this time when auto subdomain "none" is used. I have a customer which runs several internationalized sites on subdomains. For example us.domain.tld and de.domain.tld. In this case, you enter "us.domain.tld" in the domain field and set auto subdomain to none. So if someone enters us.domain.tld in the browser, he gets the content of this website.
  10. edi00

    edi00 Member

    I have learn this hard way till.
    Firstly, I have created domain.com with auto-subdomain "none" (default)
    Secondly, I have created subdomain with sub.domain.com manually added to copy my prior server settings and it worked so I was happy.
    Then somehow a was playing with auto-subdomain "*.domain.com" and my subdomain stop working but I have not attributed it to that "illogical setting". After going bananas for several days I have compared my old virtual server settings with the new virtual settings and I have discovered the problem.

    So now you know till, why am I abrasive.:rolleyes:

    You see, I am migrating from the old Unix Virtual Server Apache/mod_perl to Ubunto 10.04 Apache2/mod_perl2 + ISPConf 3 which is not documented and there is nothing on the web on the new stuff so I am in it up to my ears especially when this is just secondary to my real programing needs which is MT4 and Metatrader automated trading platform and EURUSD is falling and I am on sideline in my way to become filthy rich.:D
  11. edi00

    edi00 Member

    After recent updates to the /usr/local/ispconfig/server/conf/, as you recommended, my ISPConfig 3 is much friendlier. ..... Thanks.

    However, the issue still unresolved is: how to enter "sub.domain.com" into "ServerAlias" so I get this "ServerAlias sub.domain.com"

    a) if I use "none" there is no "ServerAlias" directive
    b) if i use "www" i get "ServerAlias www.sub.ocsatire.com" no good
    c) if i use "*" i get "ServerAlias *.sub.ocsatire.com" no good

    I could keep manually removing www or * but that my be error prone.
    Is there any way how to set it in the /usr/local/ispconfig/server/conf/ somewhere? :confused:
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats already answered in post #9, option b) Add a subdomain:

    Login to ispconfig, go to the sites module, click on "Subdomain for website", click on the "Add new subdomain" button, enter "sub" in the host field, select the domain in the "Domain" field and click on save.
  13. mike_p

    mike_p Member

    Till has already answred this question in post#3 within this thread.
    So, to make it simple....

    Go to the 'sites' page.
    Click on 'Aliasdomain for website'
    Click 'Add Aliasdomain'
    Type in the domain name you want as a ServerAlias
    Choose the domain into whose vhost file you would like it added.
    Click save.
    Wait one minute for the job to be processed.
    Job Done!

    edited to say .... damn...Till beat me to it! - but with a slightly different answer??
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    Not that different, as the alias and subdomain feature will have the same result and both will work. They are splitted up in two options to allow ISP's to give their customers just subdomains without being able to add different second level domains as well. Or in other words, the subdomains function shows you a select box with all your website domains while the alias function has a free text field instead.
  15. edi00

    edi00 Member

    I think that there was a major confusion on my part by creating wrong page test files indicating that I am looking at same Site but it was different one.

    So unless I am wrong now, you have been correct right from the outset till. Apparently there is no need for any aliasing if I create subdomain same as domain via Site menu and CNAME DSN.

    So it works nice and I am happy now.
    It is good panel...... THANKS!:eek:
  16. vaio

    vaio New Member

    Aliasdomain remove problem

    deleted by user, wrong section.,
    Last edited: Dec 2, 2010
  17. cbj4074

    cbj4074 Member HowtoForge Supporter

    A bit off-topic, but to Till's point: edi00, you can't expect to hop in a nuclear submarine when you're never operated one, press a random button that launches a missile, and then turn to the submarine's creator and say, "I pressed the big red button and it fired a missile! That's insane! Why would a big red button ever fire a missile!?"

    ISPConfig is working precisely as designed, in this particular regard, yet I still don't see an apology to Till. (You said, "You were right all along ... thanks", but that's hardly an apology.)

Share This Page