Sure, it works exactly the same as on local server but instead of editing hosts file you have DNS server, which can translate domains to IP adresses. Next, Apache server splits requests into domains by Host
header in HTTP request.
1
solved How to setup multiple site in live server?