You may be using a ubuntu machine or you are creating virtual host on ubuntu server. Open terminal using ctrl+alt+T in ubuntu, putty on windows. Connect with ssh if you are going to creating virtual host on ubuntu server.
- sudo apt-get update (it will update all libraries)
- cd /var/www (Move to www path)
- sudo mkdir -p example1.com/public_html (it will create both directory example1.com and example1.com/public_html)
- sudo mkdir -p example2.com/public_html (it will create both directory example2.com and example2.com/public_html)
- cd /etc/apache2/sites-available/