In this post I am going to show you how to change your root directory in Ubuntu 15.04. If you further want to know about root directory read my blog What is Root Directory. If you are comfortable with then let’s get started with out wasting time any more!
sudo gedit /etc/apache2/sites-available/000-default.conf
You can clearly see in the 000-default.conf file that by default root directory is /var/www/html/ which is mentioned with DefaultRoot directive. Replace /var/www/html/ with the path whatever you want to and then save the 000-default.conf file.
As you’ve replaced the default root directory with your desired one, you, now, need to restart the apache server by running the following command:
sudo service apache2 restart
Hope this will help by changing your root directory, if you have any question about it, feel free to ask by comments!