The term Virtual Host refers to the practice of maintaining more than one web site on one Apache machine or server.
Go to your apache configuration files:
cd /etc/apache2/sites-available
Create a configuration file for your new site. For an example site, http://www.hello.com:
vim hello.com
Add this content to the hello.com file
<VirtualHost *:80> ServerAdmin me@myserver DocumentRoot /var/www/hello_webroot/ ServerName www.hello.com ServerAlias hello.com *.hello.com CustomLog /var/log/apache2/example.com.log combined </VirtualHost>
you can also customize to make the log inside webroot
Activate the site by issuing the following command
sudo a2ensite hello.com
Now reload Apache
sudo /etc/init.d/apache2 restart
or
sudo service apache2 restart
And youre done 🙂
Happy Hacking