Bug or feature in ... Domain > IP-Address

Discussion in 'General' started by MacGoose, Sep 7, 2010.

  1. MacGoose

    MacGoose New Member


    Under Sites > Web Domain > Domain > IP-Address I can choose either the IP address of my server or *.

    My servers name is something like server.mydomain.com and I have two domains www.mydomain.com and intranet.mydomain.com.

    So if I go to these addresses in my browser they will go to their respective sites. Like this:

    server.mydomain.com > correct website ( root )
    www.mydomain.com > correct website ( web1 )
    intranet.mydomain.com > correct website ( web2 )

    However, if I under the settings above ... Domain > IP-Address set my intranet domain to the servers IP address. When I now try to browse to server.mydomian.com it shows the intranet site. Like this:

    server.mydomain.com > wrong website ( web2 )
    www.mydomain.com > correct website ( web1 )
    intranet.mydomain.com > correct website ( web2 )

    Also, if I only set the IP address of www.mydomain.com then there is no error. It seems to only affect the last added website.

    Is this a bug? What does the ... Domain > IP-Address do really? What is the difference of setting it to an IP address or just *?

    , MacGoose
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats the normal behaviour of the apache webserver and not a bug.

    You can either use a wildcard (*) in a apache vhost or the IP address. A IP address is always "stronger" then a wildcard. The result is that if you mix IP and * based vhosts, then a website gets redirected to the IP based site.

    So the result of this, never mix IP's and * for websites that use the same IP, either use * for all websites that point to a specific IP or use * for all sites. A IP has to be used if you need a ssl certificate, otherwise * is fine as well.

    If you like to know the details of how an apache server works, you might want to take a look at the apache server documentation: http://www.apache.org/
  3. MacGoose

    MacGoose New Member

    Thanx! You've helped me alot.

    , MacGoose

Share This Page