How to setup a mirrored server?

Hello, can somebody supply me some information for the following problem?

The idea is simple. I want to setup two identical servers with cPanel/FreeBSD. One main server and one that mirrors the main server. They will be located in the same datacenter. Both servers will use the same IP-range. The mirror-server should only be reachable when the main server isn't available.