My ISP gave me 3 IP’s for the same NIC. I managed to set them up correctly. I created one Virtual Server for the first IP address.
Now I get the following issue. When I connect on the other two IP’s I get /var/www content (Apache default), instead of the Virtual Server. How can I redirect those aliases to the real IP used in Virtual Server?
It sounds like you may need to assign those IP addresses to a particular Virtual Server.
You can do that by going into Server Configuration -> Change IP Address.
There, you can set what IP a given domain is using.
As I see in Virtualmin interface [Change IP Address], I cannot enter more than one IP address.
These are the settings:
- New IPv4 address - “Shared address” selected (the first IP in my range of three IP’s)
- External address - “Same as real address” selected
Can I use comma for giving these three IP’s to this Virtual Server? e.g. IP_1, IP_2, IP_3? I guess Virtualmin is not allow this.
One solution I got working is editing file /etc/apache2/sites-available/my_virtual_host.conf and set the first line as follows:
<code><VirtualHost IP_1:80 IP_2:80 IP_3:80></code>
When I visit IP_2 and IP_3 in web browser I am redirect to IP_1 which is correct, this one is associated with eth0.
In my opinion this is a feature request for Virtualmin in order to use IP Aliasing. Don’t you think?
While you can have as many IP addresses as you like within Virtualmin, it assumes that each domain would have just one IP address.
Virtualmin is not currently able to assign multiple IP’s to a particular domain.
We haven’t had many requests previously asking for support of more than one IP per domain – can you describe what it is you’re trying to setup there, and how you’re looking to use more than one IP per domain?
I’ll offer though that if you want all your domain names on your server responding to all these IP addresses, you could always setup your VirtualHost section in Apache like this:
If all the VirtualHost lines are like that, Virtualmin will make new VirtualHost lines the same way.