a) Create a directory with name you want
sudo mkdir /var/www/blog
b) Copy that directory to the sites-available folder
sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/blog
c) Go to that location change Add/ Edit Document root as per your
convenience.
sudo vi /etc/apache2/sites-available/blog
d) Your virtual host has been created now you have to enable that
virtual host to run , please run below command to enable .
sudo a2ensite blog
If you want to disable the virtual host then
sudo a2dissite blog
e) After this Restart the apache
sudo /etc/init.d/apache2 restart
How to create virtual host Ubuntu 13.04 | Cuelogic Blog
a) Create a directory with name you want
b) Copy that directory to the sites-available folder
c) Go to that location change Add/ Edit Document root as per your
convenience.
d) Your virtual host has been created now you have to enable that
virtual host to run , please run below command to enable .
If you want to disable the virtual host then
e) After this Restart the apache