Change apache2 default root directory

- Pranay on Sep 04 '14
- 944 views

To change the Apache http server default root directory in Ubuntu operating system from a Terminal.

Command: sudo gedit /etc/apache2/sites-available/default

  1. this will open the file "/etc/apache2/sites-available/default" in gedit text editor.. If you use any other text editor, specify its name in the command in place of gedit
  2. Then change DocumentRoot to new path eg: /home/pranay/www/
  3. Save the file and close it.

About the author

Pranay Deegoju
Sitecore Certified Professional

A Software Engineer by profession, a part time blogger and an enthusiast programmer. You can find more about me here.



Leave your comments on this post here