Ipv4-address problem - ISPConfig 3.0.4.4

Discussion in 'Installation/Configuration' started by t0rz, Apr 23, 2012.

  1. t0rz

    t0rz New Member

    Good day,
    I have a problem.

    Say my server IP is 127.0.0.1, and that I have additional IPs 127.0.0.2, 127.0.0.3, and so on.

    I also have a domain, www.example.com, pointing to 127.0.0.1.
    And I have another domain, www.something.com with a round-robin pointing to 127.0.0.1, 127.0.0.2, and so on.

    In ISPConfig, www.example.com IPV4-Address is set to 127.0.0.1 (main server IP).
    Instead, www.something.com IPV4-Address is set to *, cause it has to be reacheable with all IP addresses available.

    When I try to navigate to www.example.com, it opens successfully.
    However, www.something.com does not. It opens www.example.com.

    It may be just my lack of knowledge, but could somebody explain why is that occuring?

    Thank you very much.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    In apache, a IP address is always a stronger match then a wildcard. So if you have two domains pointing to the same IP address and then add one with * in apache and another one with the IP, then apache will display the site were you selected the IP for both domains.

    For that reason, dont match * and IP address websites on a server that use the same IP, either use * for all sites or the ip address for all sites that pint in dns to this IP but dont mix it.
     
  3. t0rz

    t0rz New Member


    So there is no way to make a website listen to multiple IP addresses with the wildcard?
     
  4. dclardy

    dclardy Member

    The wildcard allows it to listen on all IP Addresses.
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Of course you can do that, just to switch the other sites to * as well and it will work. Just dont mix * and IP for websites that resolve to the same IP address.
     
  6. t0rz

    t0rz New Member

    But I don't want other websites to listen on all IPs.
    I just want a website to be reached on all IPs and another one on just ONE IP (server main IP).
    One should be able to do this by sending the "Host" header to the server, but for some reasons it won't work.
    I understand that an IP address matches sooner than a wildcard, but the VirtualHost name should also have consideration, shouldn't it?

    I just don't get it, I always thought this could be done.
     
  7. dclardy

    dclardy Member

    Set all of those to just that one IP Address, and the other site to *.
     
  8. t0rz

    t0rz New Member

    I did that, but the website with the wildcard won't work, as it will just load the website with the single IP address.
    I mean, when you open the site with the wildcard set, it will open the site with the IP address set.
     
  9. dclardy

    dclardy Member

    When you assign an IP that IP can essentially no longer be used by another site. It becomes dedicated to just that site.
     
  10. t0rz

    t0rz New Member

    Can't it be a shared ip? :confused:
    I know shared IPs can be used, I have done that before.

    The main problem is the wildcard.
     
  11. dclardy

    dclardy Member

    From what I have seen, ISPConfig treats a defined IP as a dedicated IP. You can't use it for more than that. I think that is the case at least,
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    You can share a IP between as many webs as you like and you can use * in as many webs as youlike. So a IP is not dediacted to one website only. The only thing that you cant do is that you mix * and IP address. And thats all not ispconfig specific, its the way apache works.
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    Here a example.

    DNS Records are:

    a.tld 192.168.0.100
    b.tld 192.168.0.100
    c.tld 192.168.0.101

    so 192.168.0.100 is a shared IP address as it is used by a.tld and b.tld while c.tld has a dedicated IP.

    Apache server settings / websites:

    working setups:

    a.tld *
    b.tld *
    c.tld *

    ---

    a.tld 192.168.0.100
    b.tld 192.168.0.100
    c.tld *

    --

    a.tld *
    b.tld *
    c.tld 192.168.0.101

    --

    a.tld 192.168.0.100
    b.tld 192.168.0.100
    c.tld 192.168.0.101

    --

    Not working setups

    a.tld *
    b.tld 192.168.0.100
    c.tld *

    --
    a.tld 192.168.0.100
    b.tld *
    c.tld 192.168.0.101

    --
    a.tld 192.168.0.100
    b.tld *
    c.tld *
     
    Last edited: Apr 23, 2012
  14. t0rz

    t0rz New Member

    So IPv4-Address configuration is DNS related.
    What if a domain name has a round robin DNS?

    DNS E.g.:
    a.tld 127.0.0.1, 127.0.0.2, 127.0.0.3, 127.0.0.4, 127.0.0.5
    b.tld 127.0.0.1

    ISPConfig:
    a.tld *
    b.tld 127.0.0.1

    This can't be done, right?
     
  15. till

    till Super Moderator Staff Member ISPConfig Developer

    Right, but this can be done:

    DNS E.g.:
    a.tld 127.0.0.2, 127.0.0.3, 127.0.0.4, 127.0.0.5
    b.tld 127.0.0.1

    ISPConfig:
    a.tld *
    b.tld 127.0.0.1

    and this can be done:

    DNS E.g.:
    a.tld 127.0.0.1 127.0.0.2, 127.0.0.3, 127.0.0.4, 127.0.0.5
    b.tld 127.0.0.1

    ISPConfig:
    a.tld *
    b.tld *

    and this can be done:

    DNS E.g.:
    a.tld 127.0.0.1 127.0.0.2, 127.0.0.3, 127.0.0.4, 127.0.0.5
    b.tld 127.0.0.1

    ISPConfig:
    a.tld 127.0.0.1
    b.tld 127.0.0.1
     
  16. t0rz

    t0rz New Member

    Got it, thank you very much.
     

Share This Page