Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it safe to change the appache default website root folder to somewhere in user home? I wonder if it is okay to do. Because otherwise I have to save the default site by another name and then run apache commands to disable the default site and enable mine. So why not just edit the default site and change the document root and directory to somewhere in my home.

share|improve this question

it is safe, it's all about permissions, i put my document root within my home directory and execute `sudo chown -R www-data:www-data ~/jhano/public_html

share|improve this answer

First it is OK and safe to point the document root to some directory within your home directory.
Saying that, please notice that there is no difference over changing the owner of the current document root to be you. You can easily do so by execution chown -R <user> <webdir> where user is your username and webdir is current apache documents root where you place your site files.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.