How to configure multi fully sites

Hi All,
I am new to this open source application. I am using other opensource like kurento and xmpp servers.
May I know to setup full environment means back servers and front end server (I can use your code).
But back end servers can I use my existing server (kurento or xmpp) or how to setup your backend servers in my local environment.
In simple way I want to setup your environment in my local so I can you you code. is possible.

One more question how to configure domains or site using single server.

Thank you.