Hello I am using the above together with Apache2 and Ubuntu on 2 seperate VPS servers with the same hosting companies.
Where do I get the virtual IP address? I was told to ask the hosting company but they have no clue what i am talking about. Is there a way to figure it out? Could I use the nameserver address as its the same for them both? There has to be a way? Thanks
Keepalived will only work on a Layer2 where you have adjacent IP address. This is almost never the case in a VPS scenario.
You’d have to request a /29 of public IPs and have both VPS servers on that subnet.
What you need to do is explain to your VPS provider what you want to achieve (not what you want to do, like keepalived), and then do that.
If your VPS provider cannot give you any suggestions or proposal, this means that the VPS provider does not support this use case.