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.
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.
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.
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.
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.
When you assign an IP that IP can essentially no longer be used by another site. It becomes dedicated to just that site.
Can't it be a shared ip? I know shared IPs can be used, I have done that before. The main problem is the wildcard.
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,
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.
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 *
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?
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