Virtual hosting is hosting Internet services on a server that is accessible over the Internet, with multiple clients sharing a common server. In this tutorial I will describe how to configure virtual hosts on Mac using Xampp as localhost.
maybe you are not setting a sudo command, this kind of settings requieres admin level permissions. also you can do it directly from your local disk (normally the local disk NAME) then open '/etc/hosts' make copy (save it as backup in case of error), then open another copy (not the backup one) into a text editor or code editor then do what's in the video. Then save the file with exact same name as the original, then replace it, the system will ask you to enter your password. It should work. p.d. These directories (folders) are hidden from normal visualization (try CMD + SHIFT + period key to make them visible).